basic_json__value_t.cpp
Go to the documentation of this file.
00001 #include <json.hpp>
00002 
00003 using json = nlohmann::json;
00004 
00005 int main()
00006 {
00007     // create the different JSON values with default values
00008     json j_null(json::value_t::null);
00009     json j_boolean(json::value_t::boolean);
00010     json j_number_integer(json::value_t::number_integer);
00011     json j_number_float(json::value_t::number_float);
00012     json j_object(json::value_t::object);
00013     json j_array(json::value_t::array);
00014     json j_string(json::value_t::string);
00015 
00016     // serialize the JSON values
00017     std::cout << j_null << '\n';
00018     std::cout << j_boolean << '\n';
00019     std::cout << j_number_integer << '\n';
00020     std::cout << j_number_float << '\n';
00021     std::cout << j_object << '\n';
00022     std::cout << j_array << '\n';
00023     std::cout << j_string << '\n';
00024 }


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:01