We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
系列化对象:
package xx; public class TUser implements Serializable { public long id; }
//禁用asm(在android下使用),启用asm则没问题。 SerializeConfig.getGlobalInstance().setAsmEnable(false); String json=JSON.toJSONString(user,SerializerFeature.WriteClassName); //输出{"@type":"xx.TUser","id":0L} System.out.println(json); //下面反系列化错误:com.alibaba.fastjson.JSONException: unclosed.str //原因:id带L后缀 user=(TUser)JSON.parse(json);
if (clazz == Number.class) { return new NumberFieldSerializer(fieldInfo); }
建议改为
if (clazz == Number.class || clazz == long.class || clazz == int.class || clazz == float.class || clazz == double.class || clazz == short.class || clazz == byte.class) { return new NumberFieldSerializer(fieldInfo); }
The text was updated successfully, but these errors were encountered:
add testcase for issue 228. #288
0bcdb20
问题已经修复,谢谢反馈
Sorry, something went wrong.
74e885c
f75ce04
add testcase for issue 228. alibaba#288
3d760af
No branches or pull requests
测试例子
系列化对象:
bug源:JavaBeanSerializer#createFieldSerializer
建议改为
The text was updated successfully, but these errors were encountered: