mirror of
https://github.com/nlohmann/json.git
synced 2026-10-22 05:58:12 +00:00
11 lines
301 B
C++
11 lines
301 B
C++
#include <iostream>
|
|
#include <nlohmann/json_view.hpp>
|
|
|
|
int main()
|
|
{
|
|
nlohmann::ordered_json_document doc = nlohmann::ordered_json_document::parse(R"({"z": 1, "a": 2})");
|
|
nlohmann::ordered_json_view v = doc.root();
|
|
|
|
std::cout << std::boolalpha << v.is_object() << ' ' << v.size() << '\n';
|
|
}
|