-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
Description
Hi, first thanks for your work.
I'm having some trouble with a hasMany relationship which actually has no records.
I have a JSON like that :
{
"data": [
{
"type": "articles",
"id": "1",
"attributes": {
"title": "My Title",
},
"relationships": {
"comments": {
"data": null
}
}
}
],
}My model is like that
@JsonApi(type = "article")
public class Article extends UpdatableResource {
public String title;
public HasMany<Comment> comments;
}I'm getting this error :
com.squareup.moshi.JsonDataException: Expected BEGIN_ARRAY but was NULL at path $.data[0].relationships.comments.data
I'm using this converter for retrofit