[
https://issues.jboss.org/browse/IPROTO-34?page=com.atlassian.jira.plugin....
]
Gustavo Fernandes updated IPROTO-34:
------------------------------------
Description:
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:
{noformat}
'"' => "\\\"";
'\\' => "\\\\";
'\t' => "\\t";
'\b' => "\\b";
'\n' => "\\n";
'\r' => "\\r";
'\f' => "\\f";
{noformat}
Source: [RFC
7159|https://tools.ietf.org/html/rfc7159#section-7]:
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).
was:
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:
{noformat}
'"' => "\\\"";
'\\' => "\\\\";
'\t' => "\\t";
'\b' => "\\b";
'\n' => "\\n";
'\r' => "\\r";
'\f' => "\\f";
{noformat}
Source: [RFC
7159|https://tools.ietf.org/html/rfc7159#section-7]
Protobuf/Json mapping generates invalid json
--------------------------------------------
Key: IPROTO-34
URL:
https://issues.jboss.org/browse/IPROTO-34
Project: Infinispan ProtoStream
Issue Type: Bug
Affects Versions: 4.0.0.Alpha5
Reporter: Gustavo Fernandes
Assignee: Gustavo Fernandes
Fix For: 4.1.1.Final, 4.2.0.Final
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:
{noformat}
'"' => "\\\"";
'\\' => "\\\\";
'\t' => "\\t";
'\b' => "\\b";
'\n' => "\\n";
'\r' => "\\r";
'\f' => "\\f";
{noformat}
Source: [RFC
7159|https://tools.ietf.org/html/rfc7159#section-7]:
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).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)