You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2021/10/29 14:47:36 UTC

[GitHub] [thrift] thealmightygrant commented on a change in pull request #2474: THRIFT-5474: TSimpleJsonProtocol with inner quotes does not produce valid JSON.

thealmightygrant commented on a change in pull request #2474:
URL: https://github.com/apache/thrift/pull/2474#discussion_r739298670



##########
File path: lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
##########
@@ -314,6 +314,7 @@ public void writeString(String str) throws TException {
       char c = str.charAt(i);
       switch (c) {
       case '"':
+        escape.append('\\');
       case '\\':

Review comment:
       I'll work up a more complete test example for you today. I can see how you might not think this would make a difference. The other code is intended to try to parse the JSON strings produced from these tests, it will throw an exception otherwise. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org