Releases: danielaparker/jsoncons
Release 0.159.0
Bugs fixed:
Changes:
- In the jsonpointer extension, the type names
json_ptr
andwjson_ptr
have been deprecated and
renamed tojson_pointer
andwjson_pointer
.
Enhancements:
-
The json_pointer operators
/=
and/
now support integers. -
New override for
jsonpath::json_replace
that 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_expression
to 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 optionalmode
parameter
(JSONCONS_RDWR
orJSONCONS_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 thefrom
andinto
function object parameters has been reversed.
If you've providedfrom
andinto
function objects as arguments in your json traits convenience macros, you'll
need to reverse their order, or if you've provided just afrom
function 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_error
instead of anassertion_error
in the presence of certain kinds of bad data.
Release 0.157.1
Bugs fixed:
- The macros
JSONCONS_ALL_MEMBER_NAME_TRAITS
and
JSONCONS_N_MEMBER_NAME_TRAITS
failed at compile time
when provided with exactly two optional member arguments,
JSONCONS_RDWR
followed by aMatch
function object
(other cases were fine.) This has been fixed.
Change reverted:
- The name change
ser_error
tocodec_error
introduced in
0.157.0 has been reverted back toser_error
. Just in case
anybody used it, the namecodec_error
has been typedefed
toser_error
.
Release 0.157.0
Changes:
- The name
ser_error
has been deprecated and renamed tocodec_error
.
Enhancements:
- The
_NAME_
convenience macros now allow an optionalmode
parameter
(JSONCONS_RDWR
orJSONCONS_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_json
values to contain non-owning views of otherbasic_json
values. -
New
deep_copy
function to make a deep copy of abasic_json
value that
contains non-owning views on otherbasic_json
values. -
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::bitset
intobase16
encoded strings (JSON) and
byte strings (binary formats), and decodingstd::bitset
from integer values,
byte strings andbase16
encoded strings. -
Support 128 bit integer types
__int128
andunsigned __int128
, if supported
on the platform.
Release 0.155.1
0.155.1
Enhancements:
- Improved support for
bson_parser
to switch to array parsing
when the BSON root object is a document butdecode_bson
needs
to convert to anstd::array
,std::tuple
orstd::pair
.
Release 0.155.0
Changes:
- The
semantic_tag
enum valuetimestamp
has been deprecated.
It has been replaced byepoch_second
,epoch_milli
andepoch_nano
.
The deprecatedtimestamp
value has been aliased toepoch_second
.
Enhancements:
-
Allow
bson_parser
to switch to array parsing when the root
object is a document butdecode_bson
expects an array. -
Added
json_type_traits
support forstd::nullptr_t
-
Added
json_type_traits
support forstd::chrono::duration
-
Improved memory efficiency of jmespath extension
-
Added function
json_encode_pretty
as the preferred alternative
to thejson_encode
overload withindenting::indent
argument. -
Added
basic_json
member functiondump_pretty
as the preferred alternative
to thedump
overload withindenting::indent
argument. -
Generalized the
basic_json
member functiondump
and the functionsencode_json
andencode_csv
to write to any back insertable character container. -
Generalized the
basic_json
functionparse
and the functionsdecode_json
anddecode_csv
to read from any contiguous character sequence.