Skip to content

Commit 4c0e2dc

Browse files
committed
Fix example in docs/general/deserialization.md.
1 parent 63e9337 commit 4c0e2dc

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/general/deserialization.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,30 @@ Given a JSON API document,
3535

3636
```
3737
document = {
38-
data: {
39-
id: 1,
40-
type: 'post',
41-
attributes: {
42-
title: 'Title 1',
43-
date: '2015-12-20'
38+
'data' => {
39+
'id' => 1,
40+
'type' => 'post',
41+
'attributes' => {
42+
'title' => 'Title 1',
43+
'date' => '2015-12-20'
4444
},
45-
associations: {
46-
author: {
47-
data: {
48-
type: 'user',
49-
id: 2
45+
'associations' => {
46+
'author' => {
47+
'data' => {
48+
'type' => 'user',
49+
'id' => '2'
5050
}
5151
},
52-
second_author: {
53-
data: nil
52+
'second_author' => {
53+
'data' => nil
5454
},
55-
comments: {
56-
data: [{
57-
type: 'comment',
58-
id: 3
55+
'comments' => {
56+
'data' => [{
57+
'type' => 'comment',
58+
'id' => '3'
5959
},{
60-
type: 'comment',
61-
id: 4
60+
'type' => 'comment',
61+
'id' => '4'
6262
}]
6363
}
6464
}

0 commit comments

Comments
 (0)