Serializers and Views
摘要
A serializer in DRF is a class that defines the transformation between complex data structures and simpler representations. It provides a set of rules for converting complex data types into a format suitable for transmitting over the network, usually as JSON. The serializer determines how the data is represented when it is rendered as a response, as well as how it is deserialized when it is received as a request.