{"newversion":true,"version":1,"me":{"assets":[],"currency":[],"ready":false},"them":{"assets":[],"currency":[],"ready":false}}
格式化这个json报错。
内嵌类需要是静态,否则无法创建
I also have the com.alibaba.fastjson.JSONException: create instance error
with:Caused by: java.lang.NullPointerException
at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.createInstance(JavaBeanDeserializer.java:97)
and your chinese answer seems to be
"Embedded class needs to be static, or can not create" in english - you might want to translate your answer. Also you might want to change the behaviour from a NullPointerException to a message stating
"Class is not static ...". Better even you might want to warn about this when serializing.
@WolfgangFahl inner Class needs to be static,otherwise it can't be create.
@sonzhihui thanks for commenting. Your statement is a repetition of @wenshao 's statement of October 3 2014 in chinese. My comment is a change request about improving the Exception in adding excactly this explanation - better even avoiding the issue in the first place by already warning when serializing e.g. with a special check annotation for devlopers.
Most helpful comment
内嵌类需要是静态,否则无法创建