Sha256: 5d71e4791f54e1fa84a8ab419b2f908e6335e636c26c0b383281d54dfeb5c5ce
Contents?: true
Size: 438 Bytes
Versions: 1
Compression:
Stored size: 438 Bytes
Contents
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { // create a JSON value json value = { "the good", "the bad", "the ugly" }; // create string_t json::string_t string = "the fast"; // swap the object stored in the JSON value value[1].swap(string); // output the values std::cout << "value = " << value << '\n'; std::cout << "string = " << string << '\n'; }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/json/doc/examples/swap__string_t.cpp |