Implementing serializers
Django Rest Framework designed a serializers module similar to the Django forms module to implement the JSON presentation layer. Serializers are responsible for serializing and deserializing the data; you can see a detailed explanation about data serialization here (http://www.django-rest-framework.org/tutorial/1-serialization/#creating-a-serializer-class).
The serializers module has many useful classes, such as Serializer, ModelSerializer, HyperlinkedModelSerializer, and more (http://www.django-rest-framework.org/api-guide/serializers/). Each class has similar operations but with extended features. A Serializer class is used to design custom data representation similar to Django's form representation, and ModelSerializer ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access