-
Bug
-
Resolution: Done
-
Major
-
4.0.0.Alpha5
-
None
A json containing a string field value with the '\n', when converted to protobuf and back results in invalid json with line breaks.
The following escaping should be done:
'"' => "\\\""; '\\' => "\\\\"; '\t' => "\\t"; '\b' => "\\b"; '\n' => "\\n"; '\r' => "\\r"; '\f' => "\\f";
Source: RFC 7159:
All Unicode characters may be placed within the
quotation marks, except for the characters that must be escaped:
quotation mark, reverse solidus, and the control characters (U+0000
through U+001F).