github stephenberry/glaze v1.5.1
1.5.1

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

Breaking Wrapper Changes

Wrappers now consistently leave off the () for less typing

  • glz::quoted for reading numbers as strings and writing them as strings has been replaced with glz::quoted_num
  • The recent glz::unquote has been replaced with the name glz::quoted, which reads a string into a value and writes the value with quotes. This is less efficient for numbers than glz::quoted_num.

Below shows the format for adding wrappers within glaze metadata.

glz::quoted_num<&T::x> // reads a number as a string and writes it as a string
glz::quoted<&T::x> // reads a value as a string and unescapes, to avoid the user having to parse twice
glz::number<&T::x> // reads a string as a number and writes the string as a number
glz::invoke<&T::func> // invokes a std::function or member function with n-arguments as an array input
glz::custom<&T::read, &T::write> // calls custom read and write std::functions or member functions

Don't miss a new glaze release

NewReleases is sending notifications on new releases.