erase__key_type.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 a JSON object
00008     json j_object = {{"one", 1}, {"two", 2}};
00009 
00010     // call erase
00011     auto count_one = j_object.erase("one");
00012     auto count_three = j_object.erase("three");
00013 
00014     // print values
00015     std::cout << j_object << '\n';
00016     std::cout << count_one << " " << count_three << '\n';
00017 }


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