Breaking changes
- MessagePack and CBOR wire format (#2853): variants are written in the shape their
glz::metadeclares, as in JSON and BEVE, instead of wrapped in a Glaze-specific id or index. MessagePack structs are now keyed maps. Variants written by earlier versions no longer read back, and earlier MessagePack structs read back only understructs_as_arrays. - Removed:
glz::invoke_update(#2913),shared_async_mapandshared_async_vector(#2916),glz::hostname_include(#2924),glz::disable_padding_on/off(#2872). - Writing a
glz::invokemember is a compile error (#2913). Exclude it withmeta<T>::skip. Formats without support for a Glaze wrapper type now reject it at compile time instead of reflecting its internals (#2932). meta<T>::skipapplies to every keyed format (#2925): BEVE, CBOR, MessagePack, TOML, BSON and JSONB now drop skipped keys, as JSON and YAML already did.is_paddedis now the caller's promise that their buffer haspadding_bytesof readable slack past the end (#2872).- Stricter parsing: numbers with an empty exponent such as
1e(#2935) and JSON Pointer array indices with leading zeros (#2894) are rejected. - TLS:
http_serverand the HTTP/WebSocket clients refuse TLS 1.0 and 1.1 (#2873, #2874). - An empty
glz::raw_jsonwritesnullinstead of nothing (#2890).
Feature-test macros: glaze_v9_0_0_meta_skip_all_formats, glaze_v9_0_0_invoke, glaze_v9_0_0_wrappers_not_reflected.
Highlights
- Faster reads that never modify the input (#2872):
glz::readno longer resizes the caller's buffer to pad it, which makes small-document reads several times faster. glz::customin every format that can express it (#2811).- Compact, portable MessagePack and CBOR for variants and
glz::generic(#2853). - HTTPS server negotiates TLS 1.3 and exposes its SSL context via
configure_ssl_context(#2873). - Reusable contexts: a
glz::contextstays usable after a failed or partial read (#2927, #2930). - RFC 6902 JSON Patch conformance (#2894), and every public header compiles on its own (#2931).
What's Changed
- bound the readers instead of padding the input by @stephenberry in #2872
- http_server: negotiate TLS 1.3 and expose the SSL context by @michaelaeriksen in #2873
- net: raise the TLS floor on the client side, assert SSL context is configured before start() by @stephenberry in #2874
- Handle // comments in the JSONC formatters and fix the comment scanners (#2864) by @stephenberry in #2881
- bound prettify's writes to a fixed-capacity output by @stephenberry in #2882
- Fix YAML quote lookahead crossing line boundaries by @Skold177 in #2869
- Fix the YAML implicit-key probes' handling of the '' escape by @stephenberry in #2892
- Fold the key length into the full hash by @stephenberry in #2893
- Tidy read_base64: unsigned accumulator, 256 B decode table by @stephenberry in #2908
- Don't clobber std::atomic on a failed read by @stephenberry in #2909
- Don't skip the atomic store on non-error codes by @stephenberry in #2914
- Remove glz::invoke_update; writing an invoke member is now an error by @stephenberry in #2913
- Match prettify's depth limit to the readers by @stephenberry in #2920
- Don't count scalars against the binary-to-JSON depth limit by @stephenberry in #2921
- Enforce RFC 6901 array indices, fix RFC 6902 patch conformance by @stephenberry in #2894
- Serialize value proxies as their element in any format by @stephenberry in #2915
- Remove shared_async_map and shared_async_vector by @stephenberry in #2916
- Write null for an empty raw_json by @stephenberry in #2890
- send no body for HEAD, 204 and 304 replies in send_response_with_conn by @uwezkhan in #2917
- Fix streaming response framing by @stephenberry in #2922
- Use the shared reason-phrase table in the server writers by @stephenberry in #2923
- fix int64 wrap of far-range dates in time_point readers by @uwezkhan in #2899
- Write variants by their declared shape in MessagePack and CBOR by @stephenberry in #2853
- Count file include keys toward error_on_missing_keys by @stephenberry in #2812
- Remove glz::hostname_include by @stephenberry in #2924
- Support glz::custom for every format that can express it by @stephenberry in #2811
- Fix custom_formats_test include order by @stephenberry in #2928
- Time the ambiguous nest guards by depth scaling, not wall clock by @stephenberry in #2938
- Honor meta::skip in every keyed format by @stephenberry in #2925
- Reject wrappers in formats that lack support for them by @stephenberry in #2932
- Don't treat partial_read_complete as a failed read by @stephenberry in #2927
- Reset per-call context state so a reused context survives a failed read by @stephenberry in #2930
- Correctly round long mantissas under opts_size by @stephenberry in #2929
- Fix subproject configure with EETF or SSL enabled by @stephenberry in #2933
- Reject numbers with an empty exponent by @stephenberry in #2935
- Don't extend is_padded to buffers the caller didn't pass by @stephenberry in #2937
- Fix bit_array bit scans above 64 bits by @stephenberry in #2934
- Assert glz::visit index in range in debug builds by @stephenberry in #2936
- Make all public headers compile standalone by @stephenberry in #2931
- Quote YAML strings a literal block cannot round trip by @stephenberry in #2926
- Leave depth restoration after a partial read to call_scope by @stephenberry in #2939
- Link SQLite3::SQLite3 instead of the deprecated SQLite::SQLite3 by @stephenberry in #2940
New Contributors
- @michaelaeriksen made their first contribution in #2873
- @Skold177 made their first contribution in #2869
Full Changelog: v8.4.0...v9.0.0