One of the fastest JSON libraries in the world. Glaze reads and writes from C++ memory, simplifying interfaces and offering incredible performance.
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
#include <glaze/glaze.hpp>
Serialize a struct to JSON using Glaze
#include "glaze/glaze.hpp"
#include <iostream>
struct MyStruct {
int x = 42;
std::string name = "hello";
};
template <> struct glz::meta<MyStruct> {
using T = MyStruct;
static constexpr auto value = object(
"x", &T::x,
"name", &T::name
);
};
int main() {
MyStruct obj;
std::string json = glz::write_json(obj);
std::cout << json << '\n';
return 0;
}
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.
Resources
No resource links recorded.