67 Commits (78e43a9ea7e8d620aee0c11fcfc9755bc38083ca)
 

Author SHA1 Message Date
Andrew Twyman 78e43a9ea7 Merge pull request #68 from AustinBrunkhorst/master
[MSVC 14] int to bool conversion performance warning
7 years ago
Austin Brunkhorst 40f10bd28d Use `false` instead of `0` + conversion. 7 years ago
Andrew Twyman d9867d8ab3 Merge pull request #66 from 4brunu/master
Add option to disable unit tests
7 years ago
Austin Brunkhorst 467dc6ae05 Fixes warning C4800: 'int': forcing value to bool 'true' or 'false' on MSVC 14 7 years ago
Bruno Coelho 3704671508 Add option to disable unit tests 7 years ago
Andrew Twyman 913269c7a4 Merge pull request #64 from shrikant-dropbox/master
MSVS 2013 compatibility changes.
7 years ago
Shrikant Kelkar f6c0f68737 MSVS 2013 compatibility changes. 7 years ago
Andrew Twyman a20878aaa5 Make the DR1467 canary test code optional 7 years ago
Andrew Twyman 4597f98abe Fix sign comparison warnings, and parser confusion 7 years ago
j4cbo df1fdbfd79 Merge pull request #57 from ChrisKitching/fixpkgconfigInstall
Don't assume in-tree builds when installing json11.pc
7 years ago
Chris Kitching 05b5514400
Don't assume in-tree builds when installing json11.pc 7 years ago
j4cbo 8452587160 Merge pull request #55 from Dushistov/parse_not_full_json
Parse half ready json
7 years ago
j4cbo a1409a9a1a Merge pull request #56 from Dushistov/json_parser_anonymous
make JsonParser invisible from outside
7 years ago
Evgeniy A. Dushistov 0e4ace7e40 make parser invisible from outside 7 years ago
Evgeniy A. Dushistov 33bca8e178 implement parsing of chunked json
Update: add more tests + use parser.failed
7 years ago
Andrew Twyman eefbd630ec Merge pull request #53 from njwhite/master
Generate pkg-config File & Add Install Target
7 years ago
Nick White 8076ba74e0 Generate pkg-config File & Add Install
...to the CMake build script. The pkg-config file needs a version number (which
it takes from the CMakeLists.txt variable), which I've set to 1.0.0. The cmake
project declaration needs to be after the minimum-requirement declaration to
avoid errors from the cmake's change in VERSION semantics.
7 years ago
Andrew Twyman 3ae180068d Merge pull request #52 from kirisetsz/master
Update CMakeLists to 3.x style
7 years ago
kirisetsz 5e664c99d8 Update CMakeLists to 3.x style 7 years ago
j4cbo afcc8d0d82 Merge pull request #47 from PSPDFKit-labs/fix-warnings
This fixes a “No previous prototype for function” warning.
7 years ago
Peter Steinberger e1d5bcc94d This fixes a “No previous prototype for function” warning. 8 years ago
Andrew Twyman a6a661e924 Merge pull request #42 from capitalaslash/detect_comments
Detect and ignore comments
8 years ago
Antonio Cervone ebc3a6b038 watch out for i+1 to overflow the buffer 8 years ago
Antonio Cervone 988a8fc249 make JsonParser::strategy const 8 years ago
Antonio Cervone 49a6197d08 use an enum to select strategy on comment parsing 8 years ago
Antonio Cervone f9833b1e7d add test for unfinished multi-line comment 8 years ago
Antonio Cervone c6c6fcfeff add test for inline comment without trailing newline 8 years ago
Antonio Cervone aa270ad5b7 fix test where the trailing / was not reached due to a previous error 8 years ago
Antonio Cervone 982b2d8885 improve testing for bad inline comments 8 years ago
Antonio Cervone 4b0f5cfd77 check for end of input on every increment of the cursor 8 years ago
Antonio Cervone f21b8c360e add malformed comment tests.
add 3 testes for:
- unended multi-line comment,
- malformed single-line comment,
- trailing slash
8 years ago
Antonio Cervone d292fce9f2 improve comment test.
test also for nested and mixed comments.
whitespaces/newlines are already intermixed between comments.
8 years ago
Antonio Cervone 2f5c64225d detect malformed comments 8 years ago
Antonio Cervone b05e655c0a detect multiple comments with a loop instead of using recursion 8 years ago
Antonio Cervone 882feb56ac add bool to detect comments as run-time option. 8 years ago
Antonio Cervone de098c4d52 add testing for comment functionality 8 years ago
Antonio Cervone 08c391f89a introduce consume_garbage()
new routine that consumes whitespaces and comments.
activated by JSON11_COMMENTS pre-processor flag.
8 years ago
Antonio Cervone 2d1d176a55 add routine to detect c-style comments 8 years ago
j4cbo 765cee3ed1 Merge pull request #39 from PollRobots/use-cmake
Add cmake support
8 years ago
j4cbo b1e78cb1e4 Merge pull request #40 from PollRobots/fix-stdin-test
Fixes bug in parse_from_stdin
8 years ago
Paul C Roberts a021c3fbe2 Fixes bug in parse_from_stdin
Handles end of file correctly
8 years ago
Paul C Roberts 0c6e9d77a4 Add cmake support
This uses cmake to allow building as a static library and to build the tests

To use `cmake`

```
$ mkdir build
$ cd build
$ cmake ..
 .
 .
-- Build files have been written to: ~/json11/build
$ make
Scanning dependencies of target json11
[ 20%] Building CXX object CMakeFiles/json11.dir/json11.cpp.o
[ 40%] Linking CXX static library libjson11.a
[ 40%] Built target json11
Scanning dependencies of target json11_test
[ 60%] Building CXX object CMakeFiles/json11_test.dir/json11.cpp.o
[ 80%] Building CXX object CMakeFiles/json11_test.dir/test.cpp.o
[100%] Linking CXX executable json11_test
[100%] Built target json11_test
$ make test
running tests...
Test project /Users/paul/dev/json11/build
    Start 1: json11_test
    1/1 Test #1: json11_test ......................   Passed    0.00 sec

    100% tests passed, 0 tests failed out of 1

    Total Test time (real) =   0.01 sec
$
```
8 years ago
Andrew Twyman 61ba0a1dd2 Make test.cpp compilable with GCC.
Add clean rule to Makefile.
8 years ago
Andrew Twyman 50ed8c90e5 Test to demonstrate compiler behavior change in Xcode 7 / clang 3.7. 8 years ago
j4cbo 2aa22aab4b Merge pull request #36 from jcmonnin/master
When dumping non-finite floating point values, output 'null'.
8 years ago
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.
8 years ago
j4cbo 0193642bf8 Merge pull request #35 from akrieger/working
For extra safety, add an explicit bounds check in utf8 parsing.
8 years ago
Andrew Krieger e15ff418dd For extra safety, add an explicit bounds check in utf8 parsing. 8 years ago
Steven Kabbes cfdd67577c Use strtod not atof 8 years ago
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.
8 years ago