7
406
291
1941
但是这几个都被关闭了。
wenshao commented on 13 Apr 2016
bug fixed. included in 1.2.9 & 1.1.49.android
一个可执行的代码如下:
public class App {
private static String s1 = "{\"a\":\"b\",\"@type\":\"java.util.HashMap\"}";
private static String s2 = "{\"@type\":\"java.util.HashMap\",\"a\":\"b\"}";
public static void main(String[] args) {
s1();
s2();
}
public static void s1() {
System.out.println(JSON.toJSONString(JSON.parse(s1)));
}
public static void s2() {
System.out.println(JSON.toJSONString(JSON.parse(s2)));
}
}
期待结果是
{"a":"b"}
{"a":"b"}
实际结果是
{}
{"a":"b"}
版本:1.2.58,maven目前的最新版。