json
json copied to clipboard
Use raw string literals in code snippets for JSON text
Examples of input JSON-s contain a lot of escape characters in string literals, like in https://www.boost.org/doc/libs/develop/libs/json/doc/html/json/dom/conversion.html This makes it difficult to read. Consider using raw string literals. Instead of
assert( serialize( jv ) == "{\"x\":4,\"y\":1,\"z\":4}" );
We would have
assert( serialize( jv ) == R"({"x":4,"y":1,"z":4})" );