Lessons:11Length:1 hour

2.2 Adding a Serializer

While model classes are very important in a Django application, when we are building a REST API, models only tell half the story. We also need a way to take a concrete instance of a class and turn it into something that can be shared over the network with different platforms. The standard format used in this situation is JSON. In this lesson, I’ll show you how to translate instances of our invoice model class into JSON with a Serializer.

Related Links