Deep serialization of nested-resource(s) #18

Open
wants to merge 4 commits into
from

Conversation

Projects
None yet
1 participant
@hontas

hontas commented May 16, 2013

If a resource contains other resources they will be serialized to. This gives greater control of the JSON data representation.

Nested resource should not contain resourceName as that will mess up the structure.

hontas added some commits May 16, 2013

Serialization of nested-resource(s)
If a resource contains one or a list of resources they will be serialized to. This gives greater control of the JSON data representation. Also made resourceName optional as a nested resource would otherwise mess up the structure.
Update #serializeProperty and #serializeNestedResource
Now using Ember.isArray and Ember.Object.detectInstance
Update #serializeProperty and #serializeNestedResource
Another try, now providing a nested variable to determin if a resource is nested and should be returned without being wrapped in a named object even though it might have resourceName-property.
@hontas

This comment has been minimized.

Show comment Hide comment
@hontas

hontas May 16, 2013

Got a little confused cause we don't use resourceName in our implementation. Sorry 'bout that.

hontas commented May 16, 2013

Got a little confused cause we don't use resourceName in our implementation. Sorry 'bout that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment