kamikat / moshi-jsonapi

JSON API v1.0 Specification in Moshi.
MIT License
156 stars 34 forks source link

服务端新增了个类型,客户端没有就会解析错误吗? #72

Closed gavinliu closed 6 years ago

gavinliu commented 6 years ago

JsonAdapter.Factory jsonApiAdapterFactory = ResourceAdapterFactory.builder() .add(Comment.class)

解析未 add 的对象,就会解析不成功。

gavinliu commented 6 years ago

@JsonApi(type = "default") class Unknown extends Resource { // nothing... }

这个应该默认添加进去啊

kamikat commented 6 years ago

有道理,可以在 Builder 上加一个开关。