Releases: danielaparker/jsoncons
Release 0.127.0
Changes to staj streaming classes
-
json_cursorno longer has a constructor that accepts astaj_filter.
Use afiltered_staj_readerinstead. -
The
staj_eventfunctionas<T>has been deprecated and renamed toget<T>. -
The
staj_eventfunctionaccepthas been renamed toread_to.
Enhancements
-
New macro
JSONCONS_NONDEFAULT_MEMBER_TRAITS_DECL, that, when decoding to a C++ object,
requires all data members declared for the object to be present in the JSON (or other supported
format.) -
Types that are specialized in
json_type_traitsare no longer required to have a public default
constructor. In particular, types that are specialized usingJSONCONS_MEMBER_TRAITS_DECL
orJSONCONS_NONDEFAULT_MEMBER_TRAITS_DECLmay have a private default constructor +JSONCONS_TYPE_TRAITS_FRIEND,
and types that are specialized withJSONCONS_GETTER_CTOR_TRAITS_DECLare not required to have a default
constructor at all.
Release 0.126.0
0.126.0
Enhancements
-
The
json_readerandcsv_readerconstructors have been generalized to take either a value
from which ajsoncons::string_viewis constructible (e.g. std::string), or a value from which
asource_typeis constructible (e.g. std::istream). -
With this enhancement, the convenience typedefs
json_string_readerandcsv_string_readerare no
longer needed, and have been deprecated.
Name change
- The name
json_pull_readerhas been deprecated (still works) and renamed tojson_cursor
Changes to bigfloat mapping
In previous versions, jsoncons arrays that contained
- an int64_t or a uint64_t (defines base-2 exponent)
- an int64_t or a uint64_t or a string tagged with
semantic_tag::bigint(defines the mantissa)
and that were tagged with semantic_tag::bigfloat, were encoded into CBOR bigfloats.
This behaviour has been deprecated.
CBOR bigfloats are now decoded into a jsoncons string that consists of the following parts
- (optional) minus sign
- 0x
- nonempty sequence of hexadecimal digits (defines mantissa)
- p followed with optional minus or plus sign and nonempty sequence of hexadecimal digits (defines base-2 exponent)
and tagged with semantic_tag::bigfloat (before they were decoded into a jsoncons array and tagged with semantic_tag::bigfloat)
jsoncons strings that consist of the following parts
- (optional) plus or minus sign
- 0x or 0X
- nonempty sequence of hexadecimal digits optionally containing a decimal-point character
- (optional) p or P followed with optional minus or plus sign and nonempty sequence of decimal digits,
and tagged with semantic_tag::bigfloat are now encoded into CBOR bignums.
Release 0.125.0
CMake build fix
- The CMAKE_BUILD_TYPE variable is now left alone if already set
Non-breaking changes to lighten semantic_tag names
-
The
semantic_tagenum valuesbig_integer,big_decimal,big_floatanddate_time
have been deprecated (still work) and renamed tobigint,bigdec,bigfloatanddatetime. -
The
json_content_handlerfunctionsbig_integer_value,big_decimal_value,date_time_value
andtimestamp_valuehave been deprecated (still work.) Calls to these functions should be replaced
by calls tostring_valuewithsemantic_tag::bigint,semantic_tag::bigdec, andsemantic_tag::datetime,
and by calls toint64_vauewithsemantic_tag::timestamp. -
The enum type
big_integer_chars_formathas been deprecated (still works) and renamed to
bigint_chars_format. -
The
json_optionsmodifierbig_integer_formathas been deprecated (still works) and renamed to
bigint_format.
Non-breaking changes to ser_context, ser_error and jsonpath_error
- The function names
line_numberandcolumn_numberhave been deprecated (still work) and
renamed tolineandcolumn.
Release 0.124.0
-
Fixed bug in
json_encoderwithpad_inside_array_bracketsandpad_inside_object_bracesoptions -
Fixed issue with escape character in jsonpath quoted names.
-
Fixed pedantic level compiler warnings
-
Added doozer tests for CentOS 7.6 and Fedora release 24
-
New macro
JSONCONS_GETTER_CTOR_TRAITS_DECLthat can be used to generate thejson_type_traitsboilerplate from getter functions and a constructor.
Release 0.123.2
defect fix:
- Fixed name of JSONCONS_MEMBER_TRAITS_DECL
Release 0.123.1
jsonpath bug fixes:
-
Fixed bug in construction of normalized paths #177.
-
Fixed bug in jsonpath recursive descent with filters which could result in too many values being returned
Release 0.123.0
Warning fix:
- Removed redundant macro continuation character #176
Non-breaking change to names (old name still works)
- The name JSONCONS_TYPE_TRAITS_DECL has been deprecated and changed to JSONCONS_MEMBER_TRAITS_DECL
Changes to jsonpath:
- jsonpath unions now return distinct values (no duplicates)
- a single dot immediately followed by a left bracket now results in an error (illegal JSONPath)
Enhancements to jsonpath
-
Union of completely separate paths are allowed, e.g.
$[firstName,address.city]
-
Names in the dot notation may be single or double quoted
Other enhancements:
basic_jsonnow supports operators<,<=,>,>=
Release 0.122.0
Changes:
- The template parameter
CharThas been removed from the binary encoders
basic_bson_encoder,basic_cbor_encoder,basic_msgpack_encoder,
andbasic_ubjson_encoder.
Enhancements:
-
Added macro JSONCONS_TYPE_TRAITS_FRIEND
-
Generalized the
csv_encode,bson_encode,cbor_encode,msgpack_encodeandubjson_encodefunctions to convert from any type T that implementsjson_type_traits -
Generalized the
csv_decode,bson_decode,cbor_decode,msgpack_decodeandubjson_decodefunctions to convert to any type T that implementsjson_type_traits
Release 0.121.1
Bug fix:
- Fixed issue with cbor_reader only reading tag values 0 through 23
Name change
- The name
json::semantic_tag()has been renamed tojson::get_semantic_tag()
Non-breaking changes (old names still work)
- The name
semantic_tag_typehas been deprecated and renamed tosemantic_tag - The names
json_serializer,bson_serializer,cbor_serializer,csv_serializer,msgpack_serializer,
andubjson_serializerhave been deprecated and renamed tojson_encoder,bson_encoder,
cbor_encoder,csv_encoder,msgpack_encoder, andubjson_encoder - The names
bson_buffer_serializer,cbor_buffer_serializer,msgpack_buffer_serializer,
andubjson_buffer_serializerhave been deprecated and renamed tobson_bytes_encoder,
cbor_bytes_encoder,msgpack_bytes_encoder, andubjson_bytes_encoder - The names
bson_buffer_reader,cbor_buffer_reader,msgpack_buffer_reader,
andubjson_buffer_readerhave been deprecated and renamed tobson_bytes_reader,
cbor_bytes_reader,msgpack_bytes_reader, andubjson_bytes_reader
Enhancements
- Cleanup of
encode_jsonanddecode_jsonfunctions and increased test coverage - Rewrote cbor_reader to avoid recursive function call
- CBOR reader supports stringref extension to CBOR
- New
cbor_optionshaspacked_stringsoption
Release 0.120.0
Bug fix:
- Fixed issue with
j.as<byte_string_view>()
Non-breaking changes
- The name
is_json_type_traits_implhas been deprecated and renamed tois_json_type_traits_declared - The name
serializing_contexthas been deprecated and renamed toser_context - The name
serialization_errorhas been deprecated and renamed toser_error
Enhancements
-
json
as_byte_stringattempts to decode string values ifsemantic_tag_typeisbase64,base64url, orbase16. -
New macro
JSONCONS_TYPE_TRAITS_DECLthat can be used to generate thejson_type_traitsboilerplate
for your own types. -
New
basic_jsonmember functionget_allocator