Please include multi-word keys in sample data

Throughout the docs, simple examples are often given which give no clue as to the handling of multi-word keys.

The particular case which rankles the most is in the specification of the JSON API format itself.

http://emberjs.com/guides/models/connecting-to-an-http-server/

Ember Data expects that a GET request to /posts/1 would return the JSON in the following format:

{
  "post": {
    "id": 1,
    "title": "Rails is omakase",
    "comments": ["1", "2"],
    "user" : "dhh"
  },

  "comments": [{
    "id": "1",
    "body": "Rails is unagi"
  }, {
    "id": "2",
    "body": "Omakase O_o"
  }]
}

Can we use BlogPost instead of just Post and add a property like isPublic or something? (Or should it be is_public?)

3 Likes

I would definitely accept a PR making this change, if you’re interested in putting one together.

When and if I get it all figured out, I’ll try to put something together.

Another page to update: http://emberjs.com/guides/concepts/naming-conventions/