Sign in
fuchsia
/
third_party
/
json
/
refs/heads/upstream/master
/
.
/
docs
/
examples
/
operator_array__object_t_key_type_const.cpp
blob: 1bdb340248d1defff597d9831b857adb870eb360 [
file
] [
log
] [
blame
]
#include
<iostream>
#include
<nlohmann/json.hpp>
using
json
=
nlohmann
::
json
;
int
main
()
{
// create a JSON object
const
json object
=
{
{
"one"
,
1
},
{
"two"
,
2
},
{
"three"
,
2.9
}
};
// output element with key "two"
std
::
cout
<<
object
[
"two"
]
<<
'\n'
;
}