You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" com.alibaba.fastjson2.JSONException: illegal fieldName input/, offset 51, character /, line 4, column 6, fastjson-version 2.0.54
{
"mysql": {
"instruction": "mysql 测试",
// test
"source": "LOCAL",
"Size": 1
}
}
at com.alibaba.fastjson2.JSONReaderUTF16.readFieldNameHashCode(JSONReaderUTF16.java:1155)
at com.alibaba.fastjson2.reader.ORG_1_4_TParam.readObject(Unknown Source)
at com.alibaba.fastjson2.reader.ObjectReaderImplMapTyped.readObject(ObjectReaderImplMapTyped.java:408)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:1100)
at com.thunisoft.hyydetl.TempTest.main(TempTest.java:18)
问题描述
使用TypeReference转换成自定义对象时,json中有注释会报错
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
illegal fieldName input/
错误json数据如下
期待的正确结果
对您期望发生的结果进行清晰简洁的描述。
相关日志输出
请复制并粘贴任何相关的日志输出。
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
出乎意料的是,如果我不指定自定义的对象,使用Map,程序就正常运行
The text was updated successfully, but these errors were encountered: