[ 
https://issues.apache.org/jira/browse/FLINK-10280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

sean.miao updated FLINK-10280:
------------------------------
    Summary: json that contains an object can not be parsed  (was: json that 
contains an object can not be parse)

> json that contains an object can not be parsed
> ----------------------------------------------
>
>                 Key: FLINK-10280
>                 URL: https://issues.apache.org/jira/browse/FLINK-10280
>             Project: Flink
>          Issue Type: Bug
>          Components: Batch Connectors and Input/Output Formats
>    Affects Versions: 1.6.0
>            Reporter: sean.miao
>            Priority: Major
>
> data like :
> {"key":"\{\"key\":1}"}
> can be parsed correctly;
>  
> but data like :
> {"key":\{"key":1}}
> cannot be parsed correctly.
>  
> code position:
> JsonRowDeserializationSchema#convert
> else {
>  // for types that were specified without JSON schema
>  // e.g. POJOs
>  try {
>  return objectMapper.treeToValue(node, info.getTypeClass());
>  } catch (JsonProcessingException e) {
>  throw new IllegalStateException("Unsupported type information '" + info + "' 
> for node: " + node);
>  }
> }
>  
> My solution is as follows:
> else {
> // for types that were specified without JSON schema
> // e.g. POJOs
> try {
> return objectMapper.treeToValue(node, info.getTypeClass());
> } catch (JsonProcessingException e) {
> return node.toString
> }
> }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to