v6.0.0
Breaking Changes
- Removed the experimental language interop from
v5.6.0. Allinclude/glaze/interop/*headers, thesrc/interoptarget, and associated tests have been deleted, and theglaze_BUILD_INTEROPCMake option no longer exists. #1976 - Renamed the dynamically typed
glz::json_ttoglz::generic(include/glaze/json/generic.hpp). #1984 - Streaming HTTP clients now surface server-side failures as category-aware
std::error_codeinstances viaglz::http_status_category(). Handlers that assumed generic networking errors should read the status code withglz::http_status_from.
Highlights
Reflection & Metadata
glz::meta::modify
- New
glz::meta<T>::modify, letting you rename fields, add aliases, or append computed keys without re-declaring the full object (include/glaze/core/meta.hpp). See modify reflection guide.
Self Constraints
- Validate the aggregate after deserialization by attaching a
glz::self_constraint, which runs once all members have been populated and reports friendly messages on failure (include/glaze/core/constraint.hpp).
struct cross_constrained
{
int age{};
std::string name{};
};
template <>
struct glz::meta<cross_constrained>
{
using T = cross_constrained;
static constexpr auto combined = [](const T& v) {
return ((v.name.starts_with('A') && v.age > 10) || v.age > 5);
};
static constexpr auto value = object(&T::age, &T::name);
static constexpr auto self_constraint = glz::self_constraint<combined, "Age/name combination invalid">;
};glz::as_array wrapper
- Use
glz::as_array<&T::member>when declaring metadata to serialize/deserialize aggregate members as positional arrays while keeping struct storage.
- by @stephenberry in #1992
Improvements
- More detailed status for http errors by @stephenberry in #1970
- Skip member functions when serializing. by @stephenberry in #1969
- Test gcc15 by @stephenberry in #1979
- glz::skip support for CSV format by @stephenberry in #1983
- CSV char parsing support by @stephenberry in #1989
- Make the return type of TOML match JSON code by @stephenberry in #1995
- CORS preflight requests succeed w/o user stubs by @stephenberry in #1997
Fixes
- Fix CSV parsing for signed integral min and named enums by @stephenberry in #1977
- jmespath fix for unterminated object by @stephenberry in #1978
- Use member_names to support modify and rename together by @stephenberry in #2000
Full Changelog: v5.7.2...v6.0.0