The 1.0.0 release should be the first “official” release after the initial announcement of the class in January 2015 via reddit (“0.1.0”) and a heavily overworked second version (“0.2.0”) in February.
basic_json
, all JSON value types (array, object, string, bool, integer number, and floating-point) are now templated. That is, you can choose whether you like a std::list
for your arrays or an std::unordered_map
for your objects. The specialization json
sets some reasonable defaults.json.hpp
. Consequently, build systems such as Automake or CMake are not any longer required.src/json.hpp.re2c
. As a result, we strictly follow the JSON specification. Note neither the tool re2c nor its input are required to use the class.iterator
, const_iterator
, reverse_iterator
, and const_reverse_iterator
), comparison functions, swap()
, size()
, max_size()
, and empty()
member functions.std::allocator
, but can be templated via parameter Allocator
.std::setw
stream manipulator has been overloaded to set the desired indentation. Pretty-printing a JSON object j
is as simple as std::cout << std::setw(4) << j << '\n'
.json::value_t::number
is now called json::value_t::number_integer
to be more symmetric compared to json::value_t::number_float
.