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

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

Right now, I'm seeing this on a slightly more complex example where there is an 
invalid numeric value. The try/catch in ProcessFunction.process attempts to 
read the end of the current struct, but the json format can't handle it.

> 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 - Compiler
>    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