Skip to content

Commit 661cb59

Browse files
committed
just a little cosmetic updating
1 parent 33cc7b8 commit 661cb59

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,19 @@ You can also programmatically create `json::value` objects like this:
5353

5454
```c++
5555
int main(int argc, char *argv[]) {
56-
json::array arr = {
56+
auto arr = json::array {
5757
1,
5858
2,
5959
3,
6060
4,
61-
"Testing 1 2 3", json::object{
61+
"Testing 1 2 3",
62+
json::object{
6263
{ "hello", 1234 },
6364
{ "world", 5678 }
6465
}
6566
};
66-
67-
std::cout << stringify(arr) << std::endl;
67+
68+
std::cout << stringify(arr) << std::endl;
6869
}
6970
```
7071
@@ -76,7 +77,8 @@ Which of course results in a object representing the following JSON:
7677
2,
7778
3,
7879
4,
79-
"Testing 1 2 3", {
80+
"Testing 1 2 3",
81+
{
8082
"hello" : 1234,
8183
"world" : 5678
8284
}

example4.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ int main() {
1313
2,
1414
3,
1515
4,
16-
"Testing 1 2 3", json::object{
16+
"Testing 1 2 3",
17+
json::object{
1718
{ "hello", 1234 },
1819
{ "world", 5678 }
1920
}
2021
};
22+
2123
std::cout << stringify(arr) << std::endl;
2224
}

0 commit comments

Comments
 (0)