github stephenberry/glaze v2.3.2
2.3.2

latest releases: v8.3.0, v8.2.0, v8.1.0...
2 years ago

New Feature

Added initial glz::beve_to_json, which will directly convert BEVE into JSON, which is helpful for inspecting binary data. This is not yet fully featured, but it already supports most types.

Unit test sample of feature:

std::map<std::string, int> v = {{"first", 1}, {"second", 2}, {"third", 3}};
std::string buffer{};
glz::write_binary(v, buffer);

std::string json{};
expect(!glz::beve_to_json(buffer, json));
expect(json == R"({"first":1,"second":2,"third":3})") << json;

expect(!glz::beve_to_json<glz::opts{.prettify = true}>(buffer, json));
expect(json == //
R"({
 "first": 1,
 "second": 2,
 "third": 3
})") << json;

Fixes

  • Fix for necessary <algorithm> include in string_literal.hpp by @stephenberry in #856

Full Changelog: v2.3.1...v2.3.2

Don't miss a new glaze release

NewReleases is sending notifications on new releases.