File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ int main() {
1111 // construct from a file
1212 std::ifstream file (" example1.json" );
1313 if (file) {
14- json::value v1 = json::parse (file);
14+ auto v1 = json::parse (file);
1515 std::cout << stringify (v1, json::PRETTY_PRINT | json::ESCAPE_UNICODE) << std::endl;
1616 }
1717}
Original file line number Diff line number Diff line change 77// ------------------------------------------------------------------------------
88int main () {
99
10- // construct programmatically using object literal syntax in C++11
11- #if __cplusplus >= 201103L
12- json::array arr = {
10+ // construct programmatically using object literal syntax in C++11
11+ auto arr = json::array {
1312 1 ,
1413 2 ,
1514 3 ,
@@ -20,5 +19,4 @@ int main() {
2019 }
2120 };
2221 std::cout << stringify (arr) << std::endl;
23- #endif
2422}
You can’t perform that action at this time.
0 commit comments