Skip to content

JsonAdapter nullSafe parameter is ignored by JsonSerializer/JsonDeserializer type adapters #1553

@bufistov

Description

@bufistov

Hi there,

It looks like gson uses TreeTypeAdapter for JsonSerializer/JsonDeserializer type adapters.
TreeTypeAdapter is always nullSafe, so nullSafe value of JsonAdapter annotation is ignored in this case which is at least confusing.

I fixed this locally by adding nullSafe parameter to the TreeTypeAdapter and would love to submit a PR if it need be. Shall I go ahead?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions