Releases: stephenberry/glaze
Releases · stephenberry/glaze
1.4.4
Features:
Custom named always null types in std::variant (@jbbjarnason):
struct named_always_null : std::monostate {};
template<>
glz::meta<named_always_null> { static constexpr std::string_view name{ "my name" };
std::variant<named_always_null, int, std::string> my_variant{};
Fixes:
- Arbitrary inputs are now rejected from integer reading. Integer parsing performance is also improved (@justend29)
- Added a missing fstream include to build (@justend29)
- clang + libstdc++ workaround for std::optional (@huangminghuang)
1.4.3
Better error handling:
- Better runtime errors with
glz::format_error
, rather than printing the entire message, it prints the context and works for non-prettified messages - Better compile time errors for when the user forgets to include glaze metadata for their type
Fixes:
- Fixed writing
long long
integers and the like (@jbbjarnason)
1.4.2
1.4.1
Fixes:
- Properly erroring for invalid Enum keys
New Features:
- Added
custom_read
andcustom_write
flag support toglz::meta
, which can solve ambiguous partial template specialization (see custom-serialization.md) - Added
error_on_const_read
compile time option toglz::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
BREAKING JSON RPC 2.0 interface changes:
rpc::server_method_t
andrpc::client_method_t
have been replaced with a singlerpc::method
type.
rpc::json_rpc_t
has been replaced withrpc::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
JSON
- Safer buffer resize (avoids issues if buffer is of zero length)
- Support for raw buffers in
write_as_json
name_v
fix forlong long
andunsigned 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
- 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
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 auint64_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
andglz::arr_copy
, which behave likeglz::obj
andglz::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
- 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
- Significantly increased JSON schema support (
glz::schema
can be passed in the place of comments inglz::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,...>
)