=0||(JSON.DEFAULT_PARSER_FEATURE&safeModeMask)!=0;if(safeMode){thrownewJSONException("safeMode not support autoType : "+typeName);}if(typeName.length()>=192||typeName.length()<3){thrownewJSONException("autoType is not support. "+typeName);} 然后判断期望类expectClass,从下面可以看到这里的Obje...
thrownewJSONException("autoType is not support. "+ typeName); } } } 重点来了,接着就是来到了TypeUtils.getClassFromMapping和deserializers.findClass,如果在前面两个判断中返回了clazz,那么在第三个判断则进行返回该clazz,这里后面的部分不讲,因为后面的部分就是当你没开启autoTypeSupport的时候默认走的代码,检查...
binarySearch(acceptHashCodes, fullHash) >= 0) { continue; } throw new JSONException("autoType is not support. " + typeName); } } } 白名单列表如下: 代码语言:javascript 代码运行次数:0 复制Cloud Studio 代码运行 INTERNAL_WHITELIST_HASHCODES = new long[] { 0x82E8E13016B73F9EL, 0x863D2DD1...
@Test public void testFastjsonDeserializeNullFields() { { Map<String, String> mapWithNullValue = new HashMap<>(); mapWithNullValue.put("a", null); mapWithNullValue.put("b", null); String mapSerializeStr = JSON.toJSONString(mapWithNullValue); Map<String, String> deserializedMap =...