SimpleJSON
SimpleJSON copied to clipboard
Simple C++ JSON library
Since this project seems to be dead, I forked and fixed all open issues, merged the pull requests, added some new features and added a API documentation. You can find...
Why not to use STL-like syntax for initializing pairs of elements? Like this: map example = { {1, 5}, {4, 7} }
See: https://github.com/nbsdx/SimpleJSON/blob/8dd3e9b84a0b532c46f22f402bafb2c4cf8621eb/json.hpp#L569 Should be: c = str[ offset ]; No increment of offset should happen here, otherwise parsing of numbers in scientific representation will fail.
As issue #4 points out, json.hpp can not be included from multiple files. Adding `inline` in front of non-template functions fix this issue without having to introduce a separate .cpp...
including `json.hpp` in multiple cpp files leads to linker errors: ``` file1.o: In function `json::Array()': json.hpp:410: multiple definition of `json::Array()' file2.o:json.hpp:410: first defined here file1.o: In function `json::Object()': json.hpp:421: multiple...
ToString function now can process JSON in JSON
Various cleanups for efficiency, including removing use of std::move, see notes. The use of std::move you had was actually causing the code to be potentially slower and was at the...
issues #4 i guess is relevant