What approach should I use if I want to return only some fields from the model? I want to be able to query some fields, something like this:
? = Email fields, expiration_date, avatar (thumb_width, thumb_height, thumb_url)
This expression may also be the header in the request. I also have nested objects such as an Avatar inside a user.
This will save me hundreds of MB of traffic, as some of my models are really heavy.
UPDATE: Field selection should work with both Json and XML responses.
source share