simplified flatten/unflatten examples
This commit is contained in:
parent
a21f8b0c77
commit
ea84a85b13
7 changed files with 5 additions and 25 deletions
doc/examples
|
@ -20,18 +20,11 @@ int main()
|
|||
{
|
||||
"object", {
|
||||
{"currency", "USD"},
|
||||
{"value", 42.99},
|
||||
{"", "empty string"},
|
||||
{"/", "slash"},
|
||||
{"~", "tilde"},
|
||||
{"~1", "tilde1"}
|
||||
{"value", 42.99}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// call flatten()
|
||||
std::cout << std::setw(4) << j.flatten() << '\n';
|
||||
|
||||
// flatten for a primitive value
|
||||
std::cout << j["pi"].flatten() << '\n';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue