ackerball / protobuf-java-format

Automatically exported from code.google.com/p/protobuf-java-format
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Escaped slash is not correctly handled #38

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. prepare this json {"name":"Aamore</1"}
2. merge with JsonFormat.merge(json, aProtoObj);
3.com.googlecode.protobuf.format.JsonFormat$ParseException: 1:9: Invalid escape 
sequence: '\/'
    at com.googlecode.protobuf.format.JsonFormat$Tokenizer.parseException(JsonFormat.java:765)

What version of the product are you using? On what operating system?
protobuf-java-format 1.2 on mac osx

slash can be optionally escaped, here is not handled

Original issue reported on code.google.com by kimb...@gmail.com on 9 Jan 2012 at 2:06

GoogleCodeExporter commented 8 years ago
sorry json must be {"name":"Aamore<\/1"}  to break

Original comment by kimb...@gmail.com on 9 Jan 2012 at 2:07

GoogleCodeExporter commented 8 years ago
Fixed here:
https://github.com/obiba/protobuf-java-format/tree/1.2.x

Original comment by cedric.t...@gmail.com on 5 Apr 2013 at 3:36

GoogleCodeExporter commented 8 years ago
The forward slash can be optionally escaped. I think this patch should solve 
this problem. Can it be applied.

Original comment by jfn...@gmail.com on 23 Oct 2013 at 9:32

Attachments: