Skip to content

Added full relations serialization in toJSON#534

Open
bbbouvier wants to merge 1 commit intoPaulUithol:masterfrom
bbbouvier:master
Open

Added full relations serialization in toJSON#534
bbbouvier wants to merge 1 commit intoPaulUithol:masterfrom
bbbouvier:master

Conversation

@bbbouvier
Copy link
Copy Markdown

There are some situations when we need to make toJSON work in
different ways:

  • Communication with server where relations may be reduced to resource_uri
  • Template rendering where we need more information that the one we send to the server

Adding {full: true} to toJSON allows to avoid includeInJSON params and make a full
serialization of a model and its relations.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants