Fastjson: "{\"@type\":\"1234\"}" 解析报错异常

Created on 27 Mar 2019  ·  4Comments  ·  Source: alibaba/fastjson

String ss = "{\"@type\":\"1234\"}";
JSON.parseObject(ss)

Method threw 'java.lang.NullPointerException' exception.
Attempt to invoke virtual method 'boolean java.lang.Class.isAnnotationPresent(java.lang.Class)' on a null object reference

请问怎么关闭自省,将@type key解析为"@type"普通字符串

sdk版本: 1.1.70 android

bug

Most helpful comment

请问怎么关闭自省,将@type key解析为"@type"字符串

All 4 comments

请问怎么关闭自省,将@type key解析为"@type"字符串

same problem

JSON.parseObject(ss, Feature.IgnoreAutoType)

@sandogeek android库没有Feature.IgnoreAutoType,只有Feature.SupportAutoType,而且默认是开启的

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yemengsky picture yemengsky  ·  5Comments

sd4324530 picture sd4324530  ·  3Comments

BARERM picture BARERM  ·  3Comments

KeZhimin picture KeZhimin  ·  3Comments

lilijreey picture lilijreey  ·  4Comments