This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
fastjson-android parse crash #1529
Labels
Milestone
Comments
1.1.59及早期版本没有该问题,试了将isId 换成 isname 不会有问题,将isId换成 isheight 会有问题; 推测基本数据类型解析有问题,期待尊敬的开发同学早日修复该问题。 谢谢! |
When to publish android-1.1.65? |
wenshao
added a commit
that referenced
this issue
Oct 21, 2017
问题已经修复,将会在下周末发布新版本 |
wenshao
added a commit
that referenced
this issue
Oct 21, 2017
wenshao
added a commit
that referenced
this issue
Oct 21, 2017
@wenshao 作者您好,您有没有收到国内厂商比方说华为适配Android O 的fastjson解析失败的相关反馈? |
@wanggang0813 没有哦,手机淘宝和支付宝钱包都用fastjson,如果有相关的问题,我应该收到相关信息的。 |
wenshao
added a commit
that referenced
this issue
Jul 17, 2019
wenshao
added a commit
that referenced
this issue
Jul 17, 2019
xiongtj
pushed a commit
to fsxiaoke/fastjson
that referenced
this issue
Aug 18, 2020
* branch/fs_1_1_65: (1273 commits) 修改只有public属性可以反序列化 当进行toJSONString的时候,默认如果重用对象的话,会使用引用的方式进行引用对象。 提交fastjson兼容修改 case 追加输出jar的命令 修复只有默认构造异常 优先走JSONCreator构造方法 init add testcase. add more error info. bug fixed for JSONObject ordered. code format. add testcase for issue alibaba#1558 add testcase. add testcase for issue alibaba#1543 bug fixed for kotlin support. for issue alibaba#1524 improved testcase for issue alibaba#1529 bug fixed for 'is' prefix fieldName parser. for issue alibaba#1529 1.1.65.android-SNAPSHOT 1.1.64.android add hash collision test. ... # Conflicts: # pom.xml # src/main/java/com/alibaba/fastjson/JSON.java # src/main/java/com/alibaba/fastjson/JSONObject.java # src/main/java/com/alibaba/fastjson/TypeReference.java # src/main/java/com/alibaba/fastjson/annotation/JSONType.java # src/main/java/com/alibaba/fastjson/parser/DefaultJSONParser.java # src/main/java/com/alibaba/fastjson/parser/EnumDeserializer.java # src/main/java/com/alibaba/fastjson/parser/Feature.java # src/main/java/com/alibaba/fastjson/parser/JSONLexer.java # src/main/java/com/alibaba/fastjson/parser/JavaBeanDeserializer.java # src/main/java/com/alibaba/fastjson/parser/JavaBeanInfo.java # src/main/java/com/alibaba/fastjson/parser/ListTypeFieldDeserializer.java # src/main/java/com/alibaba/fastjson/parser/MapDeserializer.java # src/main/java/com/alibaba/fastjson/parser/ParserConfig.java # src/main/java/com/alibaba/fastjson/parser/ThrowableDeserializer.java # src/main/java/com/alibaba/fastjson/parser/deserializer/FieldDeserializer.java # src/main/java/com/alibaba/fastjson/serializer/BigDecimalCodec.java # src/main/java/com/alibaba/fastjson/serializer/DateCodec.java # src/main/java/com/alibaba/fastjson/serializer/IntegerCodec.java # src/main/java/com/alibaba/fastjson/serializer/JavaBeanSerializer.java # src/main/java/com/alibaba/fastjson/serializer/MiscCodec.java # src/main/java/com/alibaba/fastjson/serializer/NumberCodec.java # src/main/java/com/alibaba/fastjson/util/FieldInfo.java # src/main/java/com/alibaba/fastjson/util/IdentityHashMap.java # src/main/java/com/alibaba/fastjson/util/TypeUtils.java # src/test/java/com/alibaba/json/bvt/JSONObjectTest_get_2.java # src/test/java/com/alibaba/json/bvt/MapRefTest1.java # src/test/java/com/alibaba/json/bvt/MapRefTest2.java # src/test/java/com/alibaba/json/bvt/MapRefTest3.java # src/test/java/com/alibaba/json/bvt/TestExternal3.java # src/test/java/com/alibaba/json/bvt/TestExternal4.java # src/test/java/com/alibaba/json/bvt/TestExternal5.java # src/test/java/com/alibaba/json/bvt/TestExternal6.java # src/test/java/com/alibaba/json/bvt/WriteClassNameTest.java # src/test/java/com/alibaba/json/bvt/WriteClassNameTest2.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_Exception.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_Johnny.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_NonStringKeyMap.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_SpitFire.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_SpitFire_3.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_SpitFire_4.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_SpitFire_5.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_SpitFire_6.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_cduym.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_dragoon26.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_dragoon26_1.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_dubbo.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_dubbo2.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_generic_1.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_issue_184.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_issue_291.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_issue_415.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_issue_430.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_issue_462.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_lenolix_10.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_lenolix_5.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_lenolix_7.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_lenolix_8.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_lenolix_9.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_stv_liu.java # src/test/java/com/alibaba/json/bvt/bug/Bug_for_zhaoyao.java # src/test/java/com/alibaba/json/bvt/bug/CollectionEmptyMapTest.java # src/test/java/com/alibaba/json/bvt/bug/Issue146.java # src/test/java/com/alibaba/json/bvt/bug/SerDeserTest.java # src/test/java/com/alibaba/json/bvt/bug/TestJSONMap.java # src/test/java/com/alibaba/json/bvt/fullSer/EmtpyLinkedHashMapTest.java # src/test/java/com/alibaba/json/bvt/issue_1400/Issue1429.java # src/test/java/com/alibaba/json/bvt/issue_1500/Issue1503.java # src/test/java/com/alibaba/json/bvt/parser/EnumParserTest.java # src/test/java/com/alibaba/json/bvt/parser/TypeUtilsTest_castToJavaBean.java # src/test/java/com/alibaba/json/bvt/parser/deser/ConcurrentHashMapDeserializerTest.java # src/test/java/com/alibaba/json/bvt/parser/deser/DefaultObjectDeserializerTest3.java # src/test/java/com/alibaba/json/bvt/parser/deser/MapDeserializerTest.java # src/test/java/com/alibaba/json/bvt/parser/deser/ParseEmptyMap.java # src/test/java/com/alibaba/json/bvt/writeClassName/MapTest.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest2.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_Collection.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_Collection2.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_List.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_List2.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_Set.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_Set2.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_Set3.java # src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_Set4.java # src/test/java/com/alibaba/json/test/benchmark/BenchmarkMain.java
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
问题版本 : >= 1.1.60
复现Case:
public static class Person {
public int Id;
public String name;
public double height;
}
jsonStr :"[{"isId":false,"Id":138042533,"name":"example","height":172}]"
List list = JSON.parseArray(jsonStr, Person.class);
结果:
com.alibaba.fastjson.JSONException: cast error, field : Id, value false
The text was updated successfully, but these errors were encountered: