[ 
https://issues.apache.org/jira/browse/THRIFT-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861647#comment-15861647
 ] 

Christopher Wright commented on THRIFT-4082:
--------------------------------------------

Stacktrace, since those tend to be handy:


2017-02-10 10:31:31,537 WARN [qtp6062308-19] 
org.eclipse.jetty.server.HttpChannel [HttpChannel.java:487] /
org.apache.thrift.protocol.TProtocolException: Unexpected character:} at 
position 331
        at 
com.wonder.entity.JSONProtocol.readJSONSyntaxChar(JSONProtocol.java:353)
        at 
com.wonder.entity.JSONProtocol.readJSONArrayEnd(JSONProtocol.java:865)
        at com.wonder.entity.JSONProtocol.readMessageEnd(JSONProtocol.java:891)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:27)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at org.apache.thrift.server.TServlet.doPost(TServlet.java:83)

> Java library can't parse JSON generated by javascript TJSONProtocol
> -------------------------------------------------------------------
>
>                 Key: THRIFT-4082
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4082
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.10.0
>            Reporter: Christopher Wright
>            Priority: Critical
>
> Thrift definition:
> struct Entity {
>   1: string id;
> }
> service EntityService {
>   void save(1: Entity entity);
> }
> JSON document: [1,"save",1,0,{"1":{"rec":{"1":{"str":"q19786052"}}}}]
> Error:
> org.apache.thrift.protocol.TProtocolException: Unexpected character:}
> (Additionally, the parser would ideally state where it found the unexpected 
> character.)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to