Skip to content

Include metadata in JSONParser output #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 18, 2016

Conversation

hamedahmadi
Copy link

The JSONParser will add metadata in the request under a top level key _meta.

This provides access to the data in the meta tag of the request.

@hamedahmadi hamedahmadi force-pushed the hamedahmadi/metadata branch 2 times, most recently from b2bb264 to bc843f6 Compare July 21, 2016 18:26
The JSONParser will add metadata in the request under a top level key '_meta'.
@hamedahmadi hamedahmadi force-pushed the hamedahmadi/metadata branch from bc843f6 to b0c7488 Compare July 21, 2016 19:12
@jerel
Copy link
Member

jerel commented Aug 9, 2016

@hamedahmadi this looks like a nice addition. What is the reason for choosing _meta as the key name rather than meta?

@hamedahmadi
Copy link
Author

@jerel using _meta to prevent a clash in case the resource has a meta attribute.

@jerel
Copy link
Member

jerel commented Aug 11, 2016

@hamedahmadi ok, makes sense. Would you mind adding some simple documentation yet before I merge? Make a note about parsing incoming meta here: docs/usage.md#meta and add a section for JSONParser here with parse_metadata documented: docs/api.md

@hamedahmadi
Copy link
Author

@jerel Thanks for the comment, updated.

@hamedahmadi hamedahmadi force-pushed the hamedahmadi/metadata branch from d1bb7ba to 2cdb15d Compare August 16, 2016 21:20
@jerel jerel merged commit 38c7ca2 into django-json-api:develop Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants