Release 0.99.3a
·
10423 commits
to master
since this release
0.99.3a
Changes
The json
initializer-list constructor has been removed, it gives inconsistent results when an initializer has zero elements, or one element of the type being initialized (json
). Please replace
json j = {1,2,3}
with json j = json::array{1,2,3}
, and
json j = {{1,2,3},{4,5,6}}
with json j = json::array{json::array{1,2,3},json::array{4,5,6}}
- Initializer-list constructors are now supported in
json::object
as well asjson::array
, e.g.
json j = json::object{{"first",1},{"second",json::array{1,2,3}}};
- json::any has been deprecated and will be removed in the future
- The json method
to_stream
has been renamed towrite
, the old name is still supported. output_format
object_array_block_option
,array_array_block_option
functions have been deprecated and replaced by
object_array_split_lines
,array_array_split_lines
functions.
Enhancements
- A new method
get_with_default
, with return type that of the default, has been added tojson
- A new template parameter,
JsonTraits
, has been added to thebasic_json
class template. - New instantiations of
basic_json
,ojson
andwojson
, have been added for users who wish to preserve the alphabetical sort of parsed json text and to insert new members in arbitrary name order. - Added support for
json
is<T>
,as<T>
, constructor, and assignment operator for any sequence container (std::array
,std::vector
,std::deque
,std::forward_list
,std::list
) whose values are assignable to JSON types (e.g., ints, doubles, bools, strings, STL containers of same) and for associative containers (std::set
,std::multiset
,std::unordered_set
,std::unordered_multiset
.) - Added static method
null()
tojson
class to return null value - A new extension jsonx that supports serializing JSON values to JSONx (XML)
- json parser will skip
bom
in input if present
Fixes:
- Fixes to the
jsonpath
extension, including the union operator and applying index operations to string values - Fixes to remove warnings and issues reported by VS2015 with 4-th warnings level, PVS-Studio static analyzer tool, and UBSAN.