Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
d738ad7a
Commit
d738ad7a
authored
Jan 27, 2016
by
Xavier Ordoquy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to serialization results (closes #3881).
parent
72372efd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/api-guide/serializers.md
+2
-2
No files found.
docs/api-guide/serializers.md
View file @
d738ad7a
...
...
@@ -43,7 +43,7 @@ We can now use `CommentSerializer` to serialize a comment, or list of comments.
serializer = CommentSerializer(comment)
serializer.data
# {'email':
u'leila@example.com', 'content': u'foo bar', 'created': datetime.datetime(2012, 8, 22, 16, 20, 9, 822774)
}
# {'email':
'leila@example.com', 'content': 'foo bar', 'created': '2016-01-27T15:17:10.375877'
}
At this point we've translated the model instance into Python native datatypes. To finalise the serialization process we render the data into
`json`
.
...
...
@@ -51,7 +51,7 @@ At this point we've translated the model instance into Python native datatypes.
json = JSONRenderer().render(serializer.data)
json
#
'{"email": "leila@example.com", "content": "foo bar", "created": "2012-08-22T16:20:09.822
"}'
#
b'{"email":"leila@example.com","content":"foo bar","created":"2016-01-27T15:17:10.375877
"}'
## Deserializing objects
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment