kamikat / moshi-jsonapi

JSON API v1.0 Specification in Moshi.
MIT License
156 stars 34 forks source link

Resource id as Object #61

Closed yaroslavsudnik closed 7 years ago

yaroslavsudnik commented 7 years ago

Our POST-request API requires this id format:

{
  "data": {
    "id": {
      "only": "organization"
    },
    "type": "users",
    "attributes": {
      ...
    }
  }
}

How can i achieve this? Thanks

kamikat commented 7 years ago

Sorry, but the id and type must be string according to the specification http://jsonapi.org/format/#document-resource-object-identification