github stephenberry/glaze v2.0.5
2.0.5

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

Improvements

  • Reflected structs now have proper JSON schema with glz::write_json_schema
  • Enum reflection within glz::meta has been added
  • You can now write:
enum class Color { Red, Green, Blue };

template <>
struct glz::meta<Color> {
   using enum Color;
   static constexpr auto value = enumerate(Red,
                                           Green,
                                           Blue
   );
};

As with defining objects in glz::meta, you can individually customize enum keys.

I'm holding off on pure reflection for enums at the moment. By default glaze writes enums in integer form, and using pure reflection would break this behavior.

Don't miss a new glaze release

NewReleases is sending notifications on new releases.