tiny-rdm icon indicating copy to clipboard operation
tiny-rdm copied to clipboard

希望可以支持Apache Fory 的自动解码编码

Open AprilWind123 opened this issue 5 months ago • 5 comments

Apache Fory 与其他序列化框架相比,速度提高了20~170倍

AprilWind123 avatar Jul 22 '25 10:07 AprilWind123

这是官网:https://fory.apache.org

fory存redis 有很多优势, 序列化体积小,节省 Redis 内存,序列化 & 反序列化速度快,支持已有结构类,兼容性强,跨语言支持在完善, 线程安全、GC 压力小

AprilWind123 avatar Jul 23 '25 10:07 AprilWind123

这个好像只能绑定到一样结构的类才能解析吗?不能像JSON一样,或者转成类JSON的键值结构吗

tiny-craft avatar Jul 26 '25 03:07 tiny-craft

这个好像只能绑定到一样结构的类才能解析吗?不能像JSON一样,或者转成类JSON的键值结构吗

开启 deserializeNonexistentClass 选项后,如果反序列化端没有对应类型,Fory会反序列化为一个Map. Fory创建示例代码:

Fory.builder().withCompatibleMode(CompatibleMode.COMPATZIBLE).deserializeNonexistentClass(true).buildThreadSafeFory()

chaokunyang avatar Jul 28 '25 04:07 chaokunyang

Fory 还是太年轻,让子弹飞一会儿先

taozuhong avatar Jul 31 '25 09:07 taozuhong

希望这个只能绑定到相同结构的类才能解析吗?不能像JSON一样,或者转成类JSON的键值结构吗

我在他们官方也提了,说积极去适配 https://github.com/apache/fory/issues/2432

AprilWind123 avatar Jul 31 '25 10:07 AprilWind123