mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Fix some invalid JSON
This commit is contained in:
parent
b4949fbc2a
commit
b6b3aa5f21
@ -4,9 +4,9 @@ Add the root key to your API is quite simple with AMS. The **Adapter** is what d
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
id: 1,
|
"id": 1,
|
||||||
title: "Awesome Post Tile",
|
"title": "Awesome Post Tile",
|
||||||
content: "Post content"
|
"content": "Post content"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -23,10 +23,10 @@ ex:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
post: {
|
"post": {
|
||||||
id: 1,
|
"id": 1,
|
||||||
title: "Awesome Post Tile",
|
"title": "Awesome Post Tile",
|
||||||
content: "Post content"
|
"content": "Post content"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -35,16 +35,16 @@ or if it returns a collection:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
posts: [
|
"posts": [
|
||||||
{
|
{
|
||||||
id: 1,
|
"id": 1,
|
||||||
title: "Awesome Post Tile",
|
"title": "Awesome Post Tile",
|
||||||
content: "Post content"
|
"content": "Post content"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
"id": 2,
|
||||||
title: "Another Post Tile",
|
"title": "Another Post Tile",
|
||||||
content: "Another post content"
|
"content": "Another post content"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user