Skip to content

[BUG]序列化Set<Date>类型的数据异常,导致解析报错 #2475

@ybbwk

Description

@ybbwk

问题描述

使用GenericFastJsonRedisSerializer或者JSON.toJSONString方法序列化到Redis,对象中存在Set类型的字段,序列化到Redis的数据为“Set[new Date(xxxxxxxxxxxxxxx)]”,当从Redis反序列化到对象的时候,报错“string length only support string input”。将Set类型改为List则能正确的序列化并可正确反序列化

环境信息

  • OS信息: Windows 11、Ubuntu
  • JDK信息: Openjdk 17
  • 版本信息:Fastjson2 2.0.49

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions