github stephenberry/glaze v2.6.7

latest releases: v9.0.0, v8.4.0, v8.3.0...
2 years ago

Significant partial read improvements

  • New compile time option partial_read, which reads into only existing elements for objects and arrays and then returns without parsing the rest of the document. This is helpful for parsing header information to make a decision on how to parse the rest of the document.
  • Supports types like std::tuple, std::array, std::vector, std::map, std::unordered_map, glaze meta structs, and reflected structs.
  • Support for binary partial reading as well

See partial read documentation for more details

Tuple example

static constexpr glz::opts partial{.partial_read = true};
std::string s = R"(["hello",88,"a string we don't care about"])";
std::tuple<std::string, int> obj{};
expect(!glz::read<partial>(obj, s));
expect(std::get<0>(obj) == "hello");
expect(std::get<1>(obj) == 88);

Full Changelog: v2.6.6...v2.6.7

Don't miss a new glaze release

NewReleases is sending notifications on new releases.