Commit d6afaa8e authored by Niels Lohmann's avatar Niels Lohmann

📝 fixing a documentation issue #442

parent 5976caf0
......@@ -166,8 +166,14 @@ auto j2 = R"(
"pi": 3.141
}
)"_json;
```
Note that without appending the `_json` suffix, the passed string literal is not parsed, but just used as JSON string value. That is, `json j = "{ \"happy\": true, \"pi\": 3.141 }"` would just store the string `"{ "happy": true, "pi": 3.141 }"` rather than parsing the acutal object.
// or explicitly
The above example can also be expressed explicitly using `json::parse()`:
```cpp
// parse explicitly
auto j3 = json::parse("{ \"happy\": true, \"pi\": 3.141 }");
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment