DemonJun opened a new issue, #1855:
URL: https://github.com/apache/fury/issues/1855

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/fury/issues) 
and found no similar issues.
   
   
   ### Version
   
   0.7.1
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
    List<Class<?>> NEED_REGISTER_CLASS = List.of(JSONObject.class, 
JSONArray.class);
       Fury fury =
           Fury.builder()
               .withLanguage(Language.JAVA)
               
.withClassLoader(Thread.currentThread().getClass().getClassLoader())
               .withRefTracking(false)
               .withNumberCompressed(true)
               .withLongCompressed(true)
               .withStringCompressed(true)
               .registerGuavaTypes(true)
               // 关闭类型注册
               .requireClassRegistration(false)
               // 开启异步编译,提高第一次序列化效率
               .withAsyncCompilation(true)
               .build();
       AllowListChecker classChecker = new AllowListChecker();
       for (Class<?> aclass : NEED_REGISTER_CLASS) {
         fury.register(aclass);
       }
   
       // 因为关闭了 类型注册检查,这里额外添加一些,运行序列化的类前缀路径,尽量为了安全
       classChecker.allowClass("sun.util.calendar.ZoneInfo");
   
       fury.getClassResolver().setClassChecker(classChecker);
   
       JSONObject data = JSONObject.of();
       data.put("a",1);
   
       JSONObject copy = fury.copy(data);
       System.out.println(copy);
   
   ### What did you expect to see?
   
   可以正常序列化 map 类型
   
   ### What did you see instead?
   
   upgrade to 0.7.0
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to