small README fix

This commit is contained in:
Niels 2015-06-29 23:20:33 +02:00
parent 5ae2babf61
commit 55fe3807c9
2 changed files with 30 additions and 3 deletions

View File

@ -135,11 +135,11 @@ json j2 = {
Note that in all these cases, you never need to "tell" the compiler which JSON value you want to use. If you want to be explicit or express some edge cases, the functions `json::array` and `json::object` will help:
```cpp
// ways to express the empty array []
json empty_array_implicit = {{}};
// a way to express the empty array []
json empty_array_explicit = json::array();
// a way to express the empty object {}
// ways to express the empty object {}
json empty_object_implicit = json({});
json empty_object_explicit = json::object();
// a way to express an _array_ of key/value pairs [["currency", "USD"], ["value", 42.99]]

View File

@ -0,0 +1,27 @@
{
"answer": {
"everything": 42
},
"happy": true,
"list": [
1,
0,
2
],
"name": "Niels",
"new": {
"key": {
"value": [
"another",
"list"
]
}
},
"nothing": null,
"object": {
"currency": "USD",
"value": 42.99
},
"pi": 3.141,
"size": 9
}