Go to the documentation of this file.00001 #include <json.hpp>
00002
00003 using json = nlohmann::json;
00004
00005 int main()
00006 {
00007
00008 json j_object = {{"one", 1}, {"two", 2}};
00009
00010
00011 auto it_two = j_object.find("two");
00012 auto it_three = j_object.find("three");
00013
00014
00015 std::cout << std::boolalpha;
00016 std::cout << "\"two\" was found: " << (it_two != j_object.end()) << '\n';
00017 std::cout << "value at key \"two\": " << *it_two << '\n';
00018 std::cout << "\"three\" was found: " << (it_three != j_object.end()) << '\n';
00019 }