Sha256: 6235245d79445d893588f773af8c4ad762e0a350352b2f931bca43c43e6d08ed
Contents?: true
Size: 764 Bytes
Versions: 1
Compression:
Stored size: 764 Bytes
Contents
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { // create the different JSON values with default values json j_null(json::value_t::null); json j_boolean(json::value_t::boolean); json j_number_integer(json::value_t::number_integer); json j_number_float(json::value_t::number_float); json j_object(json::value_t::object); json j_array(json::value_t::array); json j_string(json::value_t::string); // serialize the JSON values std::cout << j_null << '\n'; std::cout << j_boolean << '\n'; std::cout << j_number_integer << '\n'; std::cout << j_number_float << '\n'; std::cout << j_object << '\n'; std::cout << j_array << '\n'; std::cout << j_string << '\n'; }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simdjson-0.3.0 | vendor/simdjson/dependencies/json/doc/examples/basic_json__value_t.cpp |