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
{{ message }}
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
static {
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
}
public static class Bean {
}
@Test
public void test() {
Map<Long, Bean> map = new HashMap<>();
map.put(null, new Bean());
Map<Long, Bean> rmap = (Map<Long, Bean>) JSON.parse(JSON.toJSONString(map, SerializerFeature.WriteClassName));
System.out.println(rmap);
}
java.lang.NullPointerException
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:518)
at com.alibaba.fastjson.parser.deserializer.MapDeserializer.deserialze(MapDeserializer.java:64)
at com.alibaba.fastjson.parser.deserializer.MapDeserializer.deserialze(MapDeserializer.java:41)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:358)
at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1321)
at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1287)
at com.alibaba.fastjson.JSON.parse(JSON.java:139)
at com.alibaba.fastjson.JSON.parse(JSON.java:130)
at com.yhtframework.utils.third.FastjsonUtilsTest.test(FastjsonUtilsTest.java:63)
The text was updated successfully, but these errors were encountered:
版本1.2.38
The text was updated successfully, but these errors were encountered: