Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

JSON design patterns #3

Open
bryanhirsch opened this issue Feb 1, 2013 · 2 comments
Open

JSON design patterns #3

bryanhirsch opened this issue Feb 1, 2013 · 2 comments

Comments

@bryanhirsch
Copy link
Contributor

JSON design patterns - JSON is awesome because it's free form, but there are certain design patterns (e.g., having URLs to all the related resources -- see e.g., GitHub's API which does this really well), and returning either an object (single record) or an array of objects (multiple records).

@mstade
Copy link

mstade commented Apr 22, 2013

Actually, JSON is pretty bad when it comes to hypermedia affordances. In fact, it has none! But it's easy to parse into an object model in many languages (particularly JavaScript of course) so if that's what you want, have a look at HAL. I've personally never used it in a project, but hear good things!

@inadarei
Copy link

JSON is a base format. It does not have to have much, aside from being easily parseable, I guess. A media-type that builds on top of JSON can definitely expose various kinds of required H-Factors, though.

HAL is a good example, another very good example is: Collection+JSON

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

No branches or pull requests

3 participants