-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
字段类型跟实体类定义的类型不一样时解析报错 #1790
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
json里的test字段是带转义字符的字符串,解析时报错
Exception in thread "main" com.alibaba.fastjson2.JSONException: illegal input, offset 36, char }
at com.alibaba.fastjson2.JSONReader.read(JSONReader.java:2043)
at com.alibaba.fastjson2.reader.ObjectReaderImplMap.readObject(ObjectReaderImplMap.java:434)
at com.alibaba.fastjson2.reader.ORG_1_1_A.readObject(Unknown Source)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:726)
at com.yumchina.uf.ms.store.service.impl.A.main(A.java:19)
问题1: 这种类型不匹配的情况该怎么解决?
问题2: 如果出现类型不匹配的字段,能否忽略该字段的解析,继续解析其他正常的字段?
The text was updated successfully, but these errors were encountered: