Releases: danielaparker/jsoncons
Release 0.160.0
Bugs fixed:
-
A C++20 change caused a
basic_jsonoverloaded operator '==' to be ambiguous
despite there being a unique best viable function. Fixed. -
When parsing MessagePack buffers, lengths were being incorrectly parsed as signed integers. Fixed.
Enhancements:
- Added jsonschema extension that implements the JSON Schema Draft 7
specification for validating input JSON, #280
Changes:
- Until 0.160.0,
jsonpointer::flatten, when applied to an
an empty array or empty object, would produce a flattened value
ofnullrather than[]or{}. Since 0.160.0, it will
produce[]or{}. For example, given{"bar":{},"foo":[]},
the flattened output was {"/bar":null,"/foo":null}, but is now
{"/bar":{},"/foo":[]}.jsonpointer::unflattenwill now return
the original object.
Deprecated function removed:
- The long deprecated
basic_jsonfunction
to_string(const basic_json_encode_options<char_type>&, char_allocator_type&) const
has been removed (replacement isdump).
Release 0.159.0
Bugs fixed:
Changes:
- In the jsonpointer extension, the type names
json_ptrandwjson_ptrhave been deprecated and
renamed tojson_pointerandwjson_pointer.
Enhancements:
-
The json_pointer operators
/=and/now support integers. -
New override for
jsonpath::json_replacethat searches for all values that match a JSONPath expression
and replaces them with the result of a given function, see #279 -
New factory function
jmespath::make_expressionto create compiled JMESPath expressions.
0.158.0
Bugs fixed:
- Fixed compilation error with gcc 11, #276
(thanks to Laurent Stacul)
Changes:
-
In 0.157.0, the
_NAME_convenience macros were augmented to allow an optionalmodeparameter
(JSONCONS_RDWRorJSONCONS_RDONLY) and three optional function object parameters,match(value matches expected),
from(convert from type known to jsoncons) andinto(convert into type known to jsoncons).
In this release - 0.158.0 - the order of thefromandintofunction object parameters has been reversed.
If you've providedfromandintofunction objects as arguments in your json traits convenience macros, you'll
need to reverse their order, or if you've provided just afromfunction argument, you'll need to precede it
withjsoncons::identity()(orstd::identity()if C++20). For the rationale for this change, see
#277 -
Conversion errors during decode are now reported more consistently as
jsoncons::convert_error,
parsing errors remainjsoncons::ser_error(or std::error_code) as before.
Release 0.157.2
Warnings fixed:
- Fixed C20 deprecated move_iterator access with arrow operator.
- Fixed PVS-Studio warnings
OSS-Fuzz issues fixed:
- Fixed OSS-Fuzz failed throw issue 25891 affecting
decode_ubjson
and potentially other decode functions. This means that decode
functions will throw aser_errorinstead of anassertion_error
in the presence of certain kinds of bad data.
Release 0.157.1
Bugs fixed:
- The macros
JSONCONS_ALL_MEMBER_NAME_TRAITSand
JSONCONS_N_MEMBER_NAME_TRAITSfailed at compile time
when provided with exactly two optional member arguments,
JSONCONS_RDWRfollowed by aMatchfunction object
(other cases were fine.) This has been fixed.
Change reverted:
- The name change
ser_errortocodec_errorintroduced in
0.157.0 has been reverted back toser_error. Just in case
anybody used it, the namecodec_errorhas been typedefed
toser_error.
Release 0.157.0
Changes:
- The name
ser_errorhas been deprecated and renamed tocodec_error.
Enhancements:
- The
_NAME_convenience macros now allow an optionalmodeparameter
(JSONCONS_RDWRorJSONCONS_RDONLY) and three function objects,
match(value matches expected),from(convert from type known to jsoncons)
andinto(convert into type known to jsoncons), #267
Release 0.156.1
Release 0.156.0
Bugs Fixed:
- Fixed issue with JSONCONS_N_MEMBER_NAME_TRAITS macro, \263
Enhancements:
-
New
basic_json(json_const_pointer_arg_t, const basic_json*)constructor to
allowbasic_jsonvalues to contain non-owning views of otherbasic_json
values. -
New
deep_copyfunction to make a deep copy of abasic_jsonvalue that
contains non-owning views on otherbasic_jsonvalues. -
Reduced memory allocations in the jmespath extension using the new
basic_json(json_const_pointer_arg_t, const basic_json*)constructor. -
Support for encoding
std::bitsetintobase16encoded strings (JSON) and
byte strings (binary formats), and decodingstd::bitsetfrom integer values,
byte strings andbase16encoded strings. -
Support 128 bit integer types
__int128andunsigned __int128, if supported
on the platform.
Release 0.155.1
0.155.1
Enhancements:
- Improved support for
bson_parserto switch to array parsing
when the BSON root object is a document butdecode_bsonneeds
to convert to anstd::array,std::tupleorstd::pair.
Release 0.155.0
Changes:
- The
semantic_tagenum valuetimestamphas been deprecated.
It has been replaced byepoch_second,epoch_milliandepoch_nano.
The deprecatedtimestampvalue has been aliased toepoch_second.
Enhancements:
-
Allow
bson_parserto switch to array parsing when the root
object is a document butdecode_bsonexpects an array. -
Added
json_type_traitssupport forstd::nullptr_t -
Added
json_type_traitssupport forstd::chrono::duration -
Improved memory efficiency of jmespath extension
-
Added function
json_encode_prettyas the preferred alternative
to thejson_encodeoverload withindenting::indentargument. -
Added
basic_jsonmember functiondump_prettyas the preferred alternative
to thedumpoverload withindenting::indentargument. -
Generalized the
basic_jsonmember functiondumpand the functionsencode_json
andencode_csvto write to any back insertable character container. -
Generalized the
basic_jsonfunctionparseand the functionsdecode_json
anddecode_csvto read from any contiguous character sequence.