Sha256: 68d367db8ad302c6619a3f7d1341daf8334ed9803e5c25d867bbbd844153b56f
Contents?: true
Size: 524 Bytes
Versions: 1
Compression:
Stored size: 524 Bytes
Contents
#include <iostream> #include <iomanip> #include <sstream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { // create stream with serialized JSON std::stringstream ss; ss << R"({ "number": 23, "string": "Hello, world!", "array": [1, 2, 3, 4, 5], "boolean": false, "null": null })"; // create JSON value and read the serialization from the stream json j; ss >> j; // serialize JSON std::cout << std::setw(2) << j << '\n'; }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/json/doc/examples/operator_deserialize.cpp |