Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

fastjson的EnumDeserializer优化 #1725

@ghost

Description

Map<String, Object> map= new HashMap<>(); map.put("enumField","0"); AbstractBean bean= JSON.parseObject(JSON.toJSONString(map), ConcreteBean.class);
public enum FieldEnum { A, B }
fastjson不支持使用enum ordinal方法解析enum字段吗?
我debug了1.2.45的release发现parseObject该字段时候用DefaultFieldDeserializer初始化时候并没有判断enum。除非使用@JSONField指定某个EnumDeserializer的子类,能否根据field的class自动class forName获取?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions