提交 975302bd 编写于 作者: W wenshao

fastjsont-1.1.34.android

上级 bd269d78
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.1.33.android</version> <version>1.1.34.android</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>fastjson</name> <name>fastjson</name>
......
...@@ -659,5 +659,5 @@ public abstract class JSON implements JSONStreamAware, JSONAware { ...@@ -659,5 +659,5 @@ public abstract class JSON implements JSONStreamAware, JSONAware {
return TypeUtils.cast(json, clazz, ParserConfig.getGlobalInstance()); return TypeUtils.cast(json, clazz, ParserConfig.getGlobalInstance());
} }
public final static String VERSION = "1.1.33-android"; public final static String VERSION = "1.1.34-android";
} }
...@@ -196,11 +196,7 @@ public class DeserializeBeanInfo { ...@@ -196,11 +196,7 @@ public class DeserializeBeanInfo {
String propertyName; String propertyName;
if (Character.isUpperCase(c3)) { if (Character.isUpperCase(c3)) {
if (methodName.length() > 4 && Character.isUpperCase(methodName.charAt(4))) { propertyName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
propertyName = methodName.substring(3);
} else {
propertyName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
}
} else if (c3 == '_') { } else if (c3 == '_') {
propertyName = methodName.substring(4); propertyName = methodName.substring(4);
} else if (c3 == 'f') { } else if (c3 == 'f') {
......
...@@ -946,11 +946,7 @@ public class TypeUtils { ...@@ -946,11 +946,7 @@ public class TypeUtils {
String propertyName; String propertyName;
if (Character.isUpperCase(c3)) { if (Character.isUpperCase(c3)) {
if (methodName.length() > 4 && Character.isUpperCase(methodName.charAt(4))) { propertyName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
propertyName = methodName.substring(3);
} else {
propertyName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
}
} else if (c3 == '_') { } else if (c3 == '_') {
propertyName = methodName.substring(4); propertyName = methodName.substring(4);
} else if (c3 == 'f') { } else if (c3 == 'f') {
......
...@@ -23,7 +23,7 @@ public class JSONFeidDemo2 extends TestCase { ...@@ -23,7 +23,7 @@ public class JSONFeidDemo2 extends TestCase {
System.out.println(text); System.out.println(text);
assertEquals( assertEquals(
"{\"IM_PREQ_NO\":\"111111\",\"TB_PR_INFO\":[{\"PREQ_NO\":\"t1\"},{\"PREQ_NO\":\"t2\"}]}", "{\"iM_PREQ_NO\":\"111111\",\"tB_PR_INFO\":[{\"PREQ_NO\":\"t1\"},{\"PREQ_NO\":\"t2\"}]}",
text); text);
} }
......
...@@ -14,7 +14,7 @@ public class JSONFieldTest5 extends TestCase { ...@@ -14,7 +14,7 @@ public class JSONFieldTest5 extends TestCase {
vo.setID(123); vo.setID(123);
String text = JSON.toJSONString(vo); String text = JSON.toJSONString(vo);
Assert.assertEquals("{\"ID\":123}", text); Assert.assertEquals("{\"iD\":123}", text);
Assert.assertEquals(123, JSON.parseObject(text, VO.class).getID()); Assert.assertEquals(123, JSON.parseObject(text, VO.class).getID());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册