@Type("filters")
@JsonIgnoreProperties(ignoreUnknown = true)
class NewFilter : BaseResource() {
val name: String? = null
val url: String? = null
val country: String? = null
val state: String? = null
val selectable: Boolean? = null
val type: String? = null
val typeId: Int? = null
@Relationship("children")
val childrens: List<NewFilter>? = null
}
But got that error:
com.github.jasminb.jsonapi.exceptions.InvalidJsonApiResourceException: Primary data must be either a single resource object, a single resource identifier object, or null
How to parse object, which have in relations same object?
like that
I tried that code:
But got that error:
com.github.jasminb.jsonapi.exceptions.InvalidJsonApiResourceException: Primary data must be either a single resource object, a single resource identifier object, or null