JSON Adapter
The json response is always rendered with a root key.
The root key can be overridden by:
- passing the
root
option in the render call. See details in the Rendering Guides. - setting the
type
of the serializer. See details in the Serializers Guide.
Doesn't follow any specific convention.
Example output
{
"post": {
"title": "Title 1",
"body": "Body 1",
"publish_at": "2020-03-16T03:55:25.291Z",
"author": {
"first_name": "Bob",
"last_name": "Jones"
},
"comments": [{
"body": "cool"
}, {
"body": "awesome"
}]
}
}