What is Serialization? Including Django Rest Framework Example

Django Serializer vs Django Rest Framework Serializer

When I create a Django App, I faced this question, and probably there are some people who are wondering about the same question. As you see below, there are two types of Serializer in Django. I’ll explain it quickly.

# Django Serializer
from django.core import serializers
# Django Rest Framework Serializer
from rest_framework import serializers

Example 1: ModelSerializer(Django Rest Framework Serializer)

ModelSerializer is a default serializer that will automatically create a serializer for a model in Django.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store