I have a model structure like this:
model:
server_name: str
description: str
owner: str
but the application sending data to my app use a json format I am not sure on how to create a serializer for. For multiple entries it looks like this
{
"server1": {
"description": "desc of server 1",
"owner": "service name" },
"server2": {
"description": "desc of server 2",
"owner": "service name"
}
}
but I am not sure on how to get it into something matching my model. This is the structure I would like it to have in the serializer
[
{
"server_name": "server1",
"description": "desc of server 1",
"owner": "service name"
},
{
"server_name": "server2",
"description": "desc of server 2",
"owner": "service name"
}
]
Any suggestions on this one?