mirror of
https://github.com/nlohmann/json.git
synced 2025-11-24 03:44:06 +08:00
README: Fix string representation of dumped json
As is it's confusing and inconsistent with the indented form right below. The backslash escapes make it confusing.
This commit is contained in:
committed by
GitHub
parent
973c52dd4a
commit
5fdb1d08aa
@@ -311,7 +311,7 @@ You can also get a string representation of a JSON value (serialize):
|
||||
|
||||
```cpp
|
||||
// explicit conversion to string
|
||||
std::string s = j.dump(); // {\"happy\":true,\"pi\":3.141}
|
||||
std::string s = j.dump(); // {"happy":true,"pi":3.141}
|
||||
|
||||
// serialization with pretty printing
|
||||
// pass in the amount of spaces to indent
|
||||
|
||||
Reference in New Issue
Block a user