Closed Bartheleway closed 6 years ago
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
com.squareup.moshi.JsonDataException: Expected BEGIN_ARRAY but was NULL at path $.data[0].relationships.comments.data
I'm using this converter for retrofit
Released by 3.4.0 :tada:
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 :
My model is like that
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