New Feature
- BEVE to JSON converter by @stephenberry in #859
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