Jacob Potter
07fe488804
Use an empty struct instead of nullptr_t to represent null.
...
Fixes #91 .
2017-01-17 17:05:41 -08:00
Andrew Twyman
887c6b1410
Unsigned size type
2016-12-22 17:37:20 -08:00
Jonatan "jaw" Wallmander
330956a47d
better handling of fail template in returning char
2016-10-06 09:53:49 +02:00
Jonatan "jaw" Wallmander
5d223b36ee
Fixed a type conversion warning
2016-10-01 17:31:51 +02:00
Austin Brunkhorst
40f10bd28d
Use false
instead of 0
+ conversion.
2016-07-25 17:28:15 -07:00
Austin Brunkhorst
467dc6ae05
Fixes warning C4800: 'int': forcing value to bool 'true' or 'false' on MSVC 14
2016-07-24 11:34:17 -07:00
j4cbo
8452587160
Merge pull request #55 from Dushistov/parse_not_full_json
...
Parse half ready json
2016-05-03 07:22:59 -07:00
Evgeniy A. Dushistov
0e4ace7e40
make parser invisible from outside
2016-04-28 01:28:42 +03:00
Evgeniy A. Dushistov
33bca8e178
implement parsing of chunked json
...
Update: add more tests + use parser.failed
2016-04-27 23:37:17 +03:00
Peter Steinberger
e1d5bcc94d
This fixes a “No previous prototype for function” warning.
2015-12-29 18:55:48 +01:00
Antonio Cervone
ebc3a6b038
watch out for i+1 to overflow the buffer
2015-12-02 10:01:29 +01:00
Antonio Cervone
988a8fc249
make JsonParser::strategy const
2015-12-02 09:57:25 +01:00
Antonio Cervone
49a6197d08
use an enum to select strategy on comment parsing
2015-12-01 11:08:37 +01:00
Antonio Cervone
4b0f5cfd77
check for end of input on every increment of the cursor
2015-12-01 10:59:22 +01:00
Antonio Cervone
2f5c64225d
detect malformed comments
2015-11-30 12:40:20 +01:00
Antonio Cervone
b05e655c0a
detect multiple comments with a loop instead of using recursion
2015-11-30 12:28:45 +01:00
Antonio Cervone
882feb56ac
add bool to detect comments as run-time option.
2015-11-30 12:27:35 +01:00
Antonio Cervone
08c391f89a
introduce consume_garbage()
...
new routine that consumes whitespaces and comments.
activated by JSON11_COMMENTS pre-processor flag.
2015-11-27 16:41:05 +01:00
Antonio Cervone
2d1d176a55
add routine to detect c-style comments
2015-11-27 16:31:43 +01:00
Jean-Claude Monnin
0e8c5ba68f
When dumping non-finite floating point values, output 'null'.
...
In JSON the float point special values NaN and Infinity should serialised to 'null'.
Previously, 'snprintf' in 'dump' was giving a string that isn't compliant to the JSON standard.
2015-06-04 10:35:12 +02:00
Andrew Krieger
e15ff418dd
For extra safety, add an explicit bounds check in utf8 parsing.
2015-04-22 16:09:18 -07:00
Steven Kabbes
cfdd67577c
Use strtod not atof
2015-04-08 11:37:06 -07:00
Steve Carroll
ae9542cc35
in encode_utf8, there is an implicit truncating cast that VS2015CTP6 is
...
warning about. I've added static_cast<char> to silence the warning and
express the intent.
2015-04-08 10:24:36 -07:00
k0zmo
7fd738ae42
iterate over pair of const string and Json
2014-12-30 10:31:43 +01:00
j4cbo
be631169db
Merge pull request #24 from masamitsu-murase/use_compare
...
Use string::compare to improve performance.
2014-12-04 10:14:07 -08:00
Masamitsu MURASE
37ca641d82
Use static_cast instead of reinterpret_cast for hierarchy navigation.
2014-11-30 03:49:23 +09:00
Masamitsu MURASE
c6a8736171
Use string::compare to improve performance.
2014-11-30 03:36:23 +09:00
Jacob Potter
6de4c29e76
fix int->double->int conversion in JsonInt
2014-09-22 12:07:43 -07:00
Jacob Potter
73baf7e677
Style fixes
2014-09-22 10:19:33 -07:00
Jacob Potter
679e4b83d2
Another VS14 fix
2014-08-14 12:14:21 -07:00
Jacob Potter
d9bdd84c76
Limit maximum nesting depth (issue reported by Jeff Larson)
2014-06-04 16:24:02 -07:00
Jacob Potter
277e1b166f
Make Json safe to use during static initialization.
2014-01-29 15:01:41 -08:00
Jacob Potter
d2e5485973
Spacing fix
2014-01-27 10:59:17 -08:00
Jacob Potter
979cb4ca76
Add LICENSE.txt; some minor cleanups
...
- Add LICENSE.txt
- Add a comment about how we handle numbers
- Add more test code
- Fix a narrowing-conversion issue
- Fix a comment typo
2013-10-01 19:05:12 -07:00
Jacob Potter
fe5e2167a5
Initial commit
2013-09-06 15:07:12 -07:00