Releases: danielaparker/jsoncons
Release 0.173.0
Defect fixes:
-
Fixed issue #473 about
bigintand-Werror=stringop-overflow -
Fixed jmespath issue #471 about
jmespath::searchandojsonwithAddressSanitizerin macos environment -
Fixed jsonpointer issue with
json_pointer::parsefor empty string keys (which had implications
for jsonschemadefinitionskeyword with empty keys.) -
Fixed jsonschema issue with
definitionskeyword with empty keys -
Fixed jsonschema issue #474 about JSON Schema maximum keyword error message
-
Fixed jsonschema issue with
multipleOfkeyword and type integer andmultipleOfa floating point number -
Fixed jsonschema issue with the behavior of
$idfor rebasing in some keywords, particularlyif,then, andelse.
Enhancements:
- The
jsonschema::make_schemafunctions now support providing a retrieval URI, to initialize the base URI.
Release 0.172.1
Defect fixes:
- Fixed issue #470 concerning jsonpath::make_expression with ec broken
Release 0.172.0
Defect fixes:
- Fixed issue #469 affecting JSMESPath expressions with terminating CR
Enhancements to jsonpath
-
Added
result_optionsort_descending. -
Added new classes
basic_json_location,basic_path_element, andbasic_path_node. -
Added a new function
getfor selecting a single JSON value from a JSON document at
a location represented by ajson_location. -
Added a new function
removefor removing a single JSON value from a JSON document at a
location represented by ajson_location. -
Added member function
selecttojsonpath_expression. -
Added member function
select_pathstojsonpath_expression. -
Added member function
updatetojsonpath_expression, to support
update-in-place for compiled JSONPath expressions.
Enhancements to jsonpointer:
-
Added free functions
to_stringandto_wstring. -
Added
appendfunction tobasic_json_pointer.
Release 0.171.1
Defect fixes:
-
Fixed issue #441 concerning misaligned allocation for string data.
-
Fixed issue #436 concerning overflow warning.
-
Changed internal variable names to avoid shadow warnings
-
Fixed signature of
dump_pretty#438 -
Fixed
basic_json_decode_optionsconstructor #437
Enhancements:
-
Improved error messages (with field names) for invalid type mappings when using the
json_type_traitsconvenience macros. -
Support char8_t and u8string for C++ 20
-
Added compare for bigint/bigdec/bigfloat as double or exact text match. This makes
JSON Query work if you useoptions.lossless_number(true)for parsing JSON.
Release 0.171.0
Enhancements:
-
basic_jsonsupports allocators that automatically propagate,-
std::pmr::polymorphic_allocator -
std::scoped_allocator_adaptor
-
-
Defines aliases and alias templates for
basic_jsonusing polymorphic allocators
in thejsoncons::pmrnamespace.
namespace jsoncons { namespace pmr {
template<class CharT, class Policy>
using basic_json = jsoncons::basic_json<CharT, Policy, std::pmr::polymorphic_allocator<char>>;
using json = basic_json<char,sorted_policy>;
using wjson = basic_json<wchar_t,sorted_policy>;
using ojson = basic_json<char, order_preserving_policy>;
using wojson = basic_json<wchar_t, order_preserving_policy>;
}}
-
Added a class
allocator_setfor holding an allocator for persistent data and an
allocator for temporary allocations. -
Added the ability to pass an
allocator_setobject to functionsbasic_json::parse,
decode_json,decode_csv,decode_bson,decode_cbor,decode_msgpack,decode_ubjson,
encode_json,encode_csv,encode_bson,encode_cbor,encode_msgpack,encode_ubjson. -
Added the ability to set a JSON parse error handler through options (rather than
as a separate parameter.) -
Added an error handler
allow_trailing_commas
Changes:
-
For users creating a custom
basic_jsonwith a user providedPolicy, the name
stringinPolicymust be changed tomember_key. -
Non-propagating stateful allocators are no longer supported.
Attempting to use a regular stateful allocator will produce a compile error.
Regular stateful allocators must be wrapped with std::scoped_allocator_adaptor -
Until 0.171.0, the
basic_jsonfunctionstry_emplace,emplace, andemplace_backallowed an allocator argument,
and one was required when using stateful allocators. Since 0.171.0,try_emplace,emplace, andemplace_back
must not be passed an allocator argument, because bothstd::pmr::polymorphic_allocatorandstd::scoped_allocator_adaptor
use uses-allocator construction.
Note: Non-stateful custom allocators are supported as before.
-
The tag type
result_allocator_arg_tand constantresult_allocator_arghave been deprecated. -
The
jsonpath::json_replacefunction no longer supports an optionalresult_optionsparameter. -
The order preserving versions of
basic_json,ojsonandwojson, no longer use indexes to
support search, but rely on sequential search instead. The feedback from users was that the additional
allocations and overhead wasn't worth any gains, particularly as the number of members in JSON
objects is typically not large.
Defect fixes
- Fixed issue danielaparker/jsoncons/#430 with
jsonpath::json_replace
Release 0.170.2
Defect fixes
- Fixed issue with jsonschema default values (introduced in 0.170.0)
Release 0.170.1
Defect fixes:
-
Fixed issue danielaparker/jsoncons/#418 where use of
std::aligned_storage
produced a diagnostic that it is deprecated in C++2023. -
Fixed issue danielaparker/jsoncons/#420 where
to_integer_base16produced
warnings when passed a wide character string. -
Fixed issue danielaparker/jsoncons/#391 where parsing JSON resulted
in temporary allocations fromstd::stable_sort -
Fixed issue danielaparker/jsoncons/#421 where PVS-Studio found vulnerabilities in code.
-
Fixed issue danielaparker/jsoncons/#425 where
basic_byte_string::assignandbasic_byte_string::appendfailed to compile -
Fixed issue danielaparker/jsoncons/#426 where enum keyed maps didn't serialize correctly.
Release 0.170.0
Changed:
- Removed static functions
jsonpath_expression::compile. These have long been
superceded with functionmake_expression.
Defect fixes:
-
Fixed issue danielaparker/jsoncons/#416 where
lengthoperator failed
for array of length zero. -
Fixed issue danielaparker/jsoncons/#411 where an overeager g++ 12.2.0 compiler reported a
spuriousstringop-overflowwarning. -
Fixed issue danielaparker/jsoncons/#410 where
jsoncons::jsonpath::json_location::to_string
escaped only single quotes. -
Merged PR danielaparker/jsoncons/#406 that fixed multiple float parsing and boolean pretty print
issues with wjson. This included reverting a change to usestd::from_chars
in 0.169.0.
Enhancements:
-
The jsonpath library now works with stateful allocators. In particular, the
make_expression,
json_queryandjson_replacefunctions now accept an allocator argument for use in allocating
memory during expression compilation and evaluation. -
Merged PR danielaparker/jsoncons/#395 that added a
ser_context::end_position()function.
Release 169.0
Defect fixes:
-
Fixed issue with boost_interprocess examples not working with gcc,
contributed by raplonu -
Fixed and enhance basic_json_diagnostics_visitor,
contributed by ecorm
Performance Enhancement:
- Use
std::from_charsfor chars to double conversion when
supported in GCC and VC.
Enhancements:
-
Added a
size()accessor function tobasic_staj_event.
If the event type is akeyor astring_valueor abyte_string_value,
returns the size of the key or string or byte string value.
If the event type is abegin_objector abegin_array, returns the size of the object
or array if known, otherwise 0.
For all other event types, returns 0. -
Extended the parsers/cursors/encoder for JSON, CBOR, Msgpack,
BSON, CSV, UBJSON so that they are resettable to new sources/sinks,
contributed by ecorm
Changes:
- For consistency with library naming conventions, the directory
include/jsoncons/json_merge_patchhas been renamed to
include/jsoncons/mergepatch, the namespacejson_merge_patch
tomergepatch, and the include filejson_merge_patch.hppto
mergepatch.hpp.
Release 0.168.7
Defect fixes:
-
In release 0.167.0, the
csv_options::mapping()accessor
was renamed tocsv_options::mapping_kind(), and the old name was
deprecated but still useable. That release neglected to
similarily rename the corresponding mutator, which is now
addressed. -
Fixed csv parsing issue Exponential formatted numbers with leading zeros in exponent
-
Fixed Issue with assignment of an object_iterator to const_object_iterator using empty object. This issue affects some xcode osx users.