Skip to content

fields with null value are given the non nullable type Any #23

Closed
@saied89

Description

@saied89

Jsons that contain fields with null value could not be parsed with the generated model due to the fields being assigned the non nullable type Any.
I think Any? is more appropriate.

example:
json:
{
"_id": null,
"name": "test",
"type": "test"
}
is parsed to
data class test(
@JSON(name = "_id") val id: Any, //null
@JSON(name = "name") val name: String, //test
@JSON(name = "type") val type: String //test
)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions