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
FAQ page #1
Comments
|
Oh, and 'why not HAL' https://news.ycombinator.com/item?id=5654212 and comparisons to other major types. |
|
Ok, looking forward to the FAQ...but I was thinking about making an issue for pagination, and don't understand this:
If that's the case, should jsonapi.org remove the references to pagination having a place in the |
|
It should be in the FAQ rather than the spec directly, yes. On Mon, May 6, 2013 at 5:50 AM, SphtKr notifications@github.com wrote:
|
|
I didn't want to create yet another issue for this so I'll put it here: @wycats discarded HAL because:
I like the idea of flattening the object graph. It make sense for top level entities like author but I don't think it will always make sense in every case: what about relationships of composition, where one entity owns the lifecycle of the entities on the other side of such relationship?. Examples: "Post and Comments" and the textbook example "Order and OrderItems". Both Comments and OrderItems don't make sense without their respective parent entities and I don't think it would make sense to list these entities as top level entities in the document. Also, I would consider the duplication of these entities a smell because they should be encapsulated by their parent entity. Now, iff this point is considered, this would be my suggestion to achieve it (which may be a big change):
Instead of { "id":"123",
"title": "foo",
"body": "bar",
"links": {
"comments": "http://api.example.com/post/123/comments",
"author": "http://api.example.com/people/22"
}
}I'd do: { "id":"123",
"title": "foo",
"body": "bar",
"comments": {
"href": "http://api.example.com/post/123/comments"
// using an object is more extensible (profiles?) because we can fit more info here if needed
},
"author": {
"href": "http://api.example.com/people/22"
}
}
{
"posts":[{
"id":"123",
"title": "foo",
"body": "bar",
"comments": [{ // comments are included
"id":"333",
"message":"laame"
},{
"id":"334",
"message":"I disagree"
}],
"author": {
"href": "http://api.example.com/people/888" // or any other way of pointing to the current document.
}
}],
"people":[{
"id":"888",
"name":"John"
}]
}The example is incomplete to avoid making this comment even longer. Thoughts? |
|
I started a FAQ page http://jsonapi.org/faq/. My plan is to go through all the tickets and try to list the questions and answers. Of course, PRs are a option if anyone wants to help out with this. :) |
|
+1 for contrasting JSON API with JSON-LD in the FAQ. Especially important with JSON-LD now a W3C Proposed Recommendation. |
Add JSONAPI::Serializers to Ruby implementations.
* Schema should allow link objects as pagination links * linkage -> link (#1) Probably caused by your IDE's autocompletion :) (Fixing this per #1379 (review).) Co-authored-by: Wim Leers <work@wimleers.com>
Added binarcode/laravel-restify in PHP section.
Lots of people asking questions on a few topics:
We also need to address other specs that we work with; it's not immediately obvious to people that pagination is outside of this spec, since you'd use the standard relations or just define your own.
The text was updated successfully, but these errors were encountered: