Skip to content

Releases: stephenberry/glaze

1.4.2

19 Sep 17:23
Compare
Choose a tag to compare

Binary format improvements for the format now known as BEVE

  • Added proper skipping to binary, allowing error_on_unknown_keys to be false
  • std::complex handling for binary

JSON

  • more rvalue object reading support
  • fixed write_file_json API in json_exceptions.hpp

1.4.1

31 Aug 15:30
Compare
Choose a tag to compare

Fixes:

  • Properly erroring for invalid Enum keys

New Features:

  • Added custom_read and custom_write flag support to glz::meta, which can solve ambiguous partial template specialization (see custom-serialization.md)
  • Added error_on_const_read compile time option to glz::opts, which will produce errors if an attempt is made to read into a const value (the default behavior is still to skip the value)

Internal Improvements:

  • Using .erase rather than .resize where appropriate when reducing lengths of array like types

1.4.0

24 Aug 17:30
Compare
Choose a tag to compare

BREAKING JSON RPC 2.0 interface changes:
rpc::server_method_t and rpc::client_method_t have been replaced with a single rpc::method type.
rpc::json_rpc_t has been replaced with rpc::id_t

  • Significant JSON RPC 2.0 code cleanup, with some performance improvements
  • Fixed long 0.000... float reading
  • Thread pool (glz::pool) cleaning and internal improvements

1.3.6

22 Aug 14:33
Compare
Choose a tag to compare

JSON

  • Safer buffer resize (avoids issues if buffer is of zero length)
  • Support for raw buffers in write_as_json
  • name_v fix for long long and unsigned long long (Thanks @jbbjarnason)
  • Fix the counting of json array elements when the element type is object or array (Thanks @huangminghuang)

Binary

  • Significant binary format changes to support latest EVE specification
  • Faster and cleaner binary format code
  • write_file_binary supports more buffer types
  • New binary matrix format handled with Eigen

1.3.5

07 Aug 13:42
Compare
Choose a tag to compare
  • Removed undefined behavior with page boundary checking (fixes address sanitizer complaints)
  • Much safer integer parsing, with underflow and overflow checking
  • Removed deprecated file writing functions
  • Removed some unnecessary <iostream> includes for smaller sizes on embedded devices

1.3.4

31 Jul 17:17
Compare
Choose a tag to compare

Fixes

  • Negative numbers when attempting to parse into unsigned integers are now properly errors
  • Integer types with sizes less than 8 bytes (int8_t, int16_t, int32_t, etc.) are now checked for overflow and underflow against a parse into an int64_t or a uint64_t, depending on whether signed or unsigned
  • Fixed glz::merge for nested object types
  • Removed a bad noexcept for glz::ex::read_json

New Features

  • Added glz::obj_copy and glz::arr_copy, which behave like glz::obj and glz::arr, but copy state (these structures are for logging JSON)
  • Added CSV writing for glz::recorder

Cleanup

  • Eliminated unnecessary thread_local for set reading
  • Removed an unnecessary #include <iostream>

1.3.3

17 Jul 14:19
Compare
Choose a tag to compare
  • Fixed writing out objects within glz::obj and further nesting
  • Fixed serializing maps that skip nulls (Thanks @justend29)
  • Removed now unnecessary MSVC specific code

1.3.2

13 Jul 15:55
Compare
Choose a tag to compare
  • Significantly increased JSON schema support (glz::schema can be passed in the place of comments in glz::meta) (Thanks @jbbjarnason)
  • Better support for std::string_view as map key type
  • More efficient std map type handling (especially of non-string keys, which are quoted) (Thanks @SlaaneshChosen)
  • Fixed support for glaze enum keys in map types (e.g. std::map<MyEnum,...>)

1.3.1

10 Jul 15:34
Compare
Choose a tag to compare
  • Added glz::merge, which allows users to merge JSON object types (suggested by @GJanos)
glz::obj o{"pi", 3.141};
std::map<std::string_view, int> map = {{"a", 1}, {"b", 2}, {"c", 3}};
auto merged = glz::merge{o, map};
std::string s{};
glz::write_json(merged, s); // will write out a single, merged object
// s is now: {"pi":3.141,"a":0,"b":2,"c":3}
  • Fixed null char* issues and added better concepts for char array handling (Thanks @maor-da)
  • Fixed std::max/std::min macro issues with MSVC (Thanks @alfedotov)

1.3.0

02 Jul 13:55
Compare
Choose a tag to compare

BREAKING v1.3.0 CHANGE: std::pair is now handled as a JSON object ({"first":second}}. If you require a JSON array of two items, use std::array or std::tuple.

Removed MSVC 2019 support (the compiler has too many limitations for ranges and compile time logic)

  • Added numeric enum support (default behavior)
  • std::string reading with CSV format
  • Added separate concepts for readable_map_t and writable_map_t (thanks @justend29)
  • Views and ranges of std::pair can now be serialized as objects: (thanks @justend29)
auto num_view =
std::views::iota(-2, 3) | std::views::transform([](const auto i) { return std::pair(i, i * i); });
expect(glz::write_json(num_view) == glz::sv{R"({"-2":4,"-1":1,"0":0,"1":1,"2":4})"});
  • Added glz::invoke and glz::invoke_update, which allow invoking functions when reading JSON input
  • Added GLZ_QUOTED_X helper macro (thanks @pwqbot)