Skip to content

Not able to handle NULL #1590

@sunil456

Description

@sunil456

Hi I am Currently trying to switch From Gson To Moshi But I am Facing Issues like Required value 'y' missing at $
and It's Not a Support Unit type in Kotlin.
Here is My Code Example :
{"Key":"value"} This is my Request to My API
And
{"key":"value","key":"value"} This is My Response
And My Data class like:
@JsonClass(generateAdapter = true)
data class ApiResponse(
@JSON(name = "x")
val x: String,
@JSON(name = "y")
val y: T,
@JSON(name = "z")
val z: z,
@JSON(name = "a")
val a: String,
@JSON(name = "b")
val b: String?,
@JSON(name = "c")
val c: List?,
)

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