Skip to content

Commit c46944d

Browse files
authored
Use string keys in example for Deserialization
fixes rails-api#2384
1 parent a6120f1 commit c46944d

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

lib/active_model_serializers/adapter/json_api/deserialization.rb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,30 @@ module Deserialization
2525
#
2626
# @example
2727
# document = {
28-
# data: {
29-
# id: 1,
30-
# type: 'post',
31-
# attributes: {
32-
# title: 'Title 1',
33-
# date: '2015-12-20'
28+
# 'data' => {
29+
# 'id' => 1,
30+
# 'type' => 'post',
31+
# 'attributes' => {
32+
# 'title' => 'Title 1',
33+
# 'date' => '2015-12-20'
3434
# },
35-
# associations: {
36-
# author: {
37-
# data: {
38-
# type: 'user',
39-
# id: 2
35+
# 'relationships' => {
36+
# 'author' => {
37+
# 'data' => {
38+
# 'type' => 'user',
39+
# 'id' => 2
4040
# }
4141
# },
42-
# second_author: {
43-
# data: nil
42+
# 'second_author' => {
43+
# 'data' => nil
4444
# },
45-
# comments: {
46-
# data: [{
47-
# type: 'comment',
48-
# id: 3
45+
# 'comments' => {
46+
# 'data' => [{
47+
# 'type' => 'comment',
48+
# 'id' => 3
4949
# },{
50-
# type: 'comment',
51-
# id: 4
50+
# 'type' => 'comment',
51+
# 'id' => 4
5252
# }]
5353
# }
5454
# }

0 commit comments

Comments
 (0)