Skip to content

[Java] Add deserialize overloads that take a TypeRef #3946

Description

@kostislav

Feature Request

ForyJson has fromJson methods that accept a Class, but also has overloads that accept a TypeRef for cases when the root type is generic.

Fory does not have such overloads, so it is not possible to explicitly deserialize into generic root types.

Is your feature request related to a problem? Please describe

No response

Describe the solution you'd like

It would be great if Fory.deserialize added such overloads

Describe alternatives you've considered

I tried TypeResolver.getSerializer, but couldn't figure out where to get the ReadContext for the resulting Serializer - it seemed like using too low-level tools for a high-level goal.

Additional context

No response

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