Registry / serialization / staticjson

staticjson

JSON →
library1.0.0vcpkgunverified

Fast, direct and static typed parsing of JSON with C++.

vcpkg install staticjson
INSTALL
IMPORT
SIG · STATICJSON
S
staticjson
serializationcppv1.0.0
harness data pending
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.

staticjson/staticjson.hpp
#include <staticjson/staticjson.hpp>

Parse JSON into a struct

#include <staticjson/staticjson.hpp> #include <iostream> struct Point { double x, y; }; namespace staticjson { template <> struct TypeHandler<Point> { static bool from_json(const Document &d, Point &p) { p.x = d["x"].GetDouble(); p.y = d["y"].GetDouble(); return true; } }; } int main() { staticjson::Document doc; doc.Parse("{\"x\":1.0,\"y\":2.0}"); Point p; staticjson::from_json(doc, p); std::cout << p.x << ", " << p.y << std::endl; return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
Resources

No resource links recorded.

staticjson — pip install staticjson · libregistry