Skip to content

Deserialization gives an empty hash with JSON Api #1640

Closed
@GCorbel

Description

@GCorbel

Expected behavior vs actual behavior

With the current master branch, I tried to deserialize like in the doc with a simple copy/paste. Instead of

ActiveModelSerializers::Deserialization.jsonapi_parse(document)
#=>
# {
#   title: 'Title 1',
#   date: '2015-12-20',
#   author_id: 2,
#   second_author_id: nil
#   comment_ids: [3, 4]
# }

I have this :

ActiveModelSerializers::Deserialization.jsonapi_parse(document)
#=> { }

Steps to reproduce

(e.g., detailed walkthrough, runnable script, example application)

Copy and paste from the doc

Environment

Integrated application and version (e.g., Rails, Grape, etc):

Rails 5.0.0.beta2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions