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
This is somewhat related to #31 as it relates to output format, but I've opened a new issue as that one appears to deal mostly with wanting to serialize into HAL JSON format and the solution is to extend the HAL serializer and implement a serialize method.
What I need is to serialize into the format of DS.RESTSerializer and normalize using the HAL serializer. This was the default behavior of this addon's HAL serializer in 0.1.6 when it extended DS.ActiveModelSerializer. We're upgrading apps that were made using that version of this addon.
I could of course extend the HAL serializer and implement the serialize method to do the exact same thing as DS.RESTSerializer. But that seems very sloppy, and I hate to duplicate code.
What I'd like is to have the HAL serializer functionality as mixin. Then I can extend DS.RESTSerializer with the HAL mixin. This addon's HAL serializer can still extend DS.JSONAPISerializer and use the HAL mixin as well. Or the addon itself could provide serializers that extend Ember Data's provided serializers. (DS.JSONSerializer and DS.RESTSerializer).
Without a HAL mixin in this addon, the only solution to serialize data using the JSON or REST serializer is to not use this addon and instead copy the contents of its serializer, which I don't like almost as much as duplicating the serialize method of DS.RESTSerializer.
Would this be something you'd consider?
(Note that we intend to change to JSON API, but our server framework, Apigility, doesn't yet support JSON API. So that won't happen in the immediate future.)
The text was updated successfully, but these errors were encountered:
This is somewhat related to #31 as it relates to output format, but I've opened a new issue as that one appears to deal mostly with wanting to serialize into HAL JSON format and the solution is to extend the HAL serializer and implement a serialize method.
What I need is to serialize into the format of DS.RESTSerializer and normalize using the HAL serializer. This was the default behavior of this addon's HAL serializer in 0.1.6 when it extended DS.ActiveModelSerializer. We're upgrading apps that were made using that version of this addon.
I could of course extend the HAL serializer and implement the serialize method to do the exact same thing as DS.RESTSerializer. But that seems very sloppy, and I hate to duplicate code.
What I'd like is to have the HAL serializer functionality as mixin. Then I can extend DS.RESTSerializer with the HAL mixin. This addon's HAL serializer can still extend DS.JSONAPISerializer and use the HAL mixin as well. Or the addon itself could provide serializers that extend Ember Data's provided serializers. (DS.JSONSerializer and DS.RESTSerializer).
Without a HAL mixin in this addon, the only solution to serialize data using the JSON or REST serializer is to not use this addon and instead copy the contents of its serializer, which I don't like almost as much as duplicating the serialize method of DS.RESTSerializer.
Would this be something you'd consider?
(Note that we intend to change to JSON API, but our server framework, Apigility, doesn't yet support JSON API. So that won't happen in the immediate future.)
The text was updated successfully, but these errors were encountered: