From 4c0e2dcb28a1be90fcc5ea3b4562a00d40efa50d Mon Sep 17 00:00:00 2001 From: Lucas Hosseini Date: Mon, 18 Apr 2016 01:04:50 +0200 Subject: [PATCH] Fix example in docs/general/deserialization.md. --- docs/general/deserialization.md | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/general/deserialization.md b/docs/general/deserialization.md index 56dda833..41433c1c 100644 --- a/docs/general/deserialization.md +++ b/docs/general/deserialization.md @@ -35,30 +35,30 @@ Given a JSON API document, ``` 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 + 'associations' => { + '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' }] } }