Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for support for attributes to contain complex data but not resources #41

Open
cnolewajka opened this issue Mar 9, 2017 · 0 comments

Comments

@cnolewajka
Copy link

As per spec, an attribute, even when not a simple value, doesn't have to be a resource:
http://jsonapi.org/format/#document-resource-object-attributes

I would like to request an extension when an attribute can produce a valid json but not necessarily be a simple value, for instance: (see someNonSimpleAttribute)

{
  "data": {
    "id": "1",
    "type": "articles",
    "attributes": {
      "title": "JSON API paints my bikeshed!",
      "numberDecimal": 3.0,
      "numberInt": 0,
      "boolVal": false,
      "someNonSimpleAttribute": {
        "subAtt1": "text",
        "subAtt1": 5
      }
    },
    "relationships": {...
    },
    "links": {
      "self": "http://localhost:56827/articles/1"
    }
  },
  "links": {
    "self": "http://localhost:56827/articles/1"
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants