Skip to content

glaze 7.5.0#279856

Merged
BrewTestBot merged 2 commits intomainfrom
bump-glaze-7.5.0
Apr 28, 2026
Merged

glaze 7.5.0#279856
BrewTestBot merged 2 commits intomainfrom
bump-glaze-7.5.0

Conversation

@BrewTestBot
Copy link
Copy Markdown
Contributor

Created by brew bump


Created with brew bump-formula-pr.

Details

release notes
# BSON Support

Glaze now supports BSON. Helper types (glz::bson::object_id, datetime, regex, javascript, decimal128, timestamp, binary, min_key, max_key) cover BSON wire types that have no native JSON equivalent, and glz::bson_to_json produces MongoDB Canonical Extended JSON v2.

Faster Float Writing

glz::to_chars for floats now uses a header-only port of Victor Zverovich's zmij (Schubfach + xjb) in place of dragonbox.

  • ~2.7× faster than dragonbox on random finite doubles, ~3× faster on floats.
  • The size-optimized path (OptSize=true) is ~4–8× faster than the previous simple_float::to_chars at roughly the same footprint.
  • Side-effect bugfix: simple_float::from_chars no longer hits a 1-ULP rounding miss on platforms where long double aliases double (ARM64 macOS, MSVC).

Full exhaustive sweep over all 4,278,190,080 finite float values round-trips exactly.

Struct Flattening with glz::merge

glz::merge now works inside glz::meta with member pointers, enabling both reading and writing of composite structs as flat JSON objects.

struct Species { std::string name{}; int legs{}; };
struct Appearance { double weight{}; std::string color{}; };
struct BearRecord { Species species{}; Appearance appearance{}; };

template <>
struct glz::meta<BearRecord> {
   using T = BearRecord;
   static constexpr auto value = glz::merge{&T::species, &T::appearance};
};

// Reads and writes as: {"name":"Grizzly","legs":4,"weight":300.5,"color":"brown"}

Sub-types can be either glaze_object_t (with custom key names) or reflectable (automatic reflection), and any number of sub-structs can be merged. Implemented entirely at the reflect<T> layer, so JSON, BEVE, YAML, CBOR, and other formats all pick it up automatically.

flatten_map Wrapper

A new glz::flatten_map wrapper serializes map-like containers as flat arrays of the form [key elements..., mapped value, ...], supporting fixed-size keys (std::pair, tuples, Glaze arrays, std::array) for both reading and writing.

std::unordered_map<std::pair<int, int>, std::string, pair_hash> map;
map[{1, 2}] = "example";

std::string out;
glz::write_json(glz::flatten_map_wrapper{map}, out);
// out == R"([1,2,"example"])"

Usable both inside glz::meta via member pointer (glz::flatten_map<&T::m>) and as a top-level CTAD wrapper (glz::flatten_map_wrapper{map}).

Improvements

Fixes

  • Named enum map keys: reading a std::map keyed by an enum declared with the keys + value array form of glz::meta no longer fails with expected_quote by @stephenberry in Named enum fix stephenberry/glaze#2523
  • jsonb_to_json now emits 9e999 / -9e999 for ±Infinity (matching SQLite's json() convention) instead of null. NaN continues to map to null. Documentation also clarifies that 64-bit integer / binary64 float ranges are a Glaze implementation constraint, not a SQLite spec limit by @stephenberry in jsonb_to_json: match SQLite json() for infinities stephenberry/glaze#2521

Full Changelog: stephenberry/glaze@v7.4.0...v7.5.0

View the full release notes at https://github.com/stephenberry/glaze/releases/tag/v7.5.0.


@github-actions github-actions Bot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Apr 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🤖 An automated task has requested bottles to be published to this PR.

Caution

Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch.

@github-actions github-actions Bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Apr 28, 2026
@BrewTestBot BrewTestBot enabled auto-merge April 28, 2026 15:27
@BrewTestBot BrewTestBot added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 512d2d6 Apr 28, 2026
22 checks passed
@BrewTestBot BrewTestBot deleted the bump-glaze-7.5.0 branch April 28, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants