Skip to content

Commit

Permalink
Use string keys in example for Deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabigeek authored Jun 29, 2020
1 parent a6120f1 commit c46944d
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions lib/active_model_serializers/adapter/json_api/deserialization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ module Deserialization
#
# @example
# document = {
# data: {
# id: 1,
# type: 'post',
# attributes: {
# title: 'Title 1',
# date: '2015-12-20'
# 'data' => {
# 'id' => 1,
# 'type' => 'post',
# 'attributes' => {
# 'title' => 'Title 1',
# 'date' => '2015-12-20'
# },
# associations: {
# author: {
# data: {
# type: 'user',
# id: 2
# 'relationships' => {
# 'author' => {
# 'data' => {
# 'type' => 'user',
# 'id' => 2
# }
# },
# second_author: {
# data: nil
# 'second_author' => {
# 'data' => nil
# },
# comments: {
# data: [{
# type: 'comment',
# id: 3
# 'comments' => {
# 'data' => [{
# 'type' => 'comment',
# 'id' => 3
# },{
# type: 'comment',
# id: 4
# 'type' => 'comment',
# 'id' => 4
# }]
# }
# }
Expand Down

0 comments on commit c46944d

Please sign in to comment.