mercredi 29 mars 2017

Ember Data - Serialization Options

I have a model with a hasMany realtionship.

I currently use the EmbeddedRecordsMixin to include the JSONAPI in my payload that is then sent to the server.

My problem is that I wish to send only the JSON representation of this object. i.e without type and attributes hash. Instead I wish to the send the payload as simply JSON { id: 1, Name: 'Darren', Surname: 'Blh' ... }

How is it possible to convert the JSONAPI to JSON?

Thanks

Darren




Aucun commentaire:

Enregistrer un commentaire