Commit Graph

8 Commits

Author SHA1 Message Date
Niels bd9f49efb9 implemented pretty printing (issue #13)
- to_string() method is now called dump()
- syntax borrowed from Python’s json.dumps()
2015-01-06 21:44:07 +01:00
Niels 5f05d02c6a Merge pull request #14 from elliotgoodrich/master
Fix double delete on std::bad_alloc exception
2015-01-06 18:43:21 +01:00
Niels a53c878c81 moved class into "nlohmann" namespace
- fixed issue #9
- also removed std::mutex member variable
- also added “std::” prefix to size_t variables
2015-01-06 18:41:24 +01:00
Elliot Goodrich 0773f40a8e Fix double delete on std::bad_alloc exception
If the new operator throws in the json::find methods then result.oi_ is
deleted again in the destructor of json::iterator/json::const_iterator,
which is a double delete and undefined behaviour.
2015-01-06 09:12:55 +00:00
Niels a9669a410d removed "noexpect" from all functions that use new 2015-01-04 23:18:24 +01:00
Niels 540cda6118 used _-suffix for member variables 2015-01-04 23:09:30 +01:00
Niels 3bef1a5097 renamed "toString()" to "to_string()" 2015-01-04 20:50:28 +01:00
Niels f63ff7727e renamed class from "JSON" to "son" 2015-01-04 20:43:25 +01:00