How do I put null in the network model field?
I have a model like this
@JsonApi(type = "notes")
data class Note(
var name: String? = null,
var description: String? = null,
var note: String? = null,
@field:Json(name = "created-at")
var createdAt: Date? = null
}
I want to patch the null value in the createdAt field to the server, but this field is ignored and it simply does not exist in the body.
{"data":{"type":"note","id":"168356"}}
How can I send null?
How do I put null in the network model field? I have a model like this
@JsonApi(type = "notes") data class Note( var name: String? = null, var description: String? = null, var note: String? = null, @field:Json(name = "created-at") var createdAt: Date? = null }
I want to patch the null value in the createdAt field to the server, but this field is ignored and it simply does not exist in the body. {"data":{"type":"note","id":"168356"}} How can I send null?