You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that the JSONAPISource was designed to work with a JSON API compliant data source. However, it would be nice if it was easily customizable to support variations of the spec. Specifically:
Allow providing specific resources paths for certain models in the schema
Provide a simple hook for making adjustments to serialization/deserialization. The current deserialize method is not very suited to be overwritten since one would need to copy/paste a lot of code. For example, what if instead of {users: [..], ...} I want to parse something like {data: [...], ...}? This should be possible through a simple hook like parseData: response -> response.data.
Perhaps it would make sense to create an intermediate model like AjaxSource or something that covers some of the common ground of remote sources in general but provides more flexibility regarding encoding, serialization etc.
The text was updated successfully, but these errors were encountered:
I understand that the
JSONAPISource
was designed to work with a JSON API compliant data source. However, it would be nice if it was easily customizable to support variations of the spec. Specifically:{users: [..], ...}
I want to parse something like{data: [...], ...}
? This should be possible through a simple hook likeparseData: response -> response.data
.Perhaps it would make sense to create an intermediate model like
AjaxSource
or something that covers some of the common ground of remote sources in general but provides more flexibility regarding encoding, serialization etc.The text was updated successfully, but these errors were encountered: