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 count_two = j_object.count("two");
00012 auto count_three = j_object.count("three");
00013
00014
00015 std::cout << std::boolalpha;
00016 std::cout << "number of elements with key \"two\": " << count_two << '\n';
00017 std::cout << "number of elements with key \"three\": " << count_three << '\n';
00018 }