Django (DRF) Serializers To Handle Nested JSON data
I have been dealing with a lot of JSON data more than ever before. All of the data are coming from a Webhook provider upon certain events. One of the things I was not comfortable with was the nested JSON structure until I found there is a clean way to solve it. Our Django app uses Django REST Framework (DRF) and relies heavily on its serialization capabilities. What are we going to see Looking at the data (JSON/dict) Looking at the model where the data is about to be stored Writing DRF serializer to handle the nested data More details of how its done using to_internal_value() conclusion A sample JSON data for context This is a webhook event when a charging session is started and stopped....