minor changes
This commit is contained in:
parent
d84f8ebb02
commit
08456b8ff0
@ -115,7 +115,11 @@ You can create an object (deserialization) by appending `_json` to a string lite
|
||||
json j = "{ \"pi\": 3.141, \"happy\": true }"_json;
|
||||
|
||||
// or even nicer (thanks http://isocpp.org/blog/2015/01/json-for-modern-cpp)
|
||||
auto j2 = R"( {"pi": 3.141, "happy": true} )"_json;
|
||||
auto j2 = R"(
|
||||
{
|
||||
"pi": 3.141,
|
||||
"happy": true
|
||||
})"_json;
|
||||
```
|
||||
|
||||
You can also get a string representation (serialize):
|
||||
|
@ -1778,7 +1778,10 @@ TEST_CASE("Parser")
|
||||
auto j3 = "{\"key\": \"value\"}"_json;
|
||||
CHECK(j3["key"] == "value");
|
||||
|
||||
auto j22 = R"({"pi": 3.141, "happy": true })"_json;
|
||||
auto j22 = R"({
|
||||
"pi": 3.141,
|
||||
"happy": true
|
||||
})"_json;
|
||||
auto j23 = "{ \"pi\": 3.141, \"happy\": true }"_json;
|
||||
CHECK(j22 == j23);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user