JSON Hypermedia - GistLabs/mechanize GitHub Wiki

JSON and hypermedia support

Their are several new functions we are building to support hypermedia in JSON. The CSS Selectors for JSON is a way to use pure CSS selectors to search into and find JSON nodes. JSON Linking build hyperlinks from JSON objects using patterns and URI Templates to lookup values from the surrounding JSON data. The (soon to be implemented) JSON Actions will extend JSON links to full HTTP/HTML Forms-like support - enabling POST, PUT, and GET from hypermedia defined entirely in JSON.

JSON Hypermedia should be...

These are the fundamental assumptions we when designing JSON Hypermedia:

  1. There is value in the flexibility of encoding data into JSON and hypermedia should work that way too
  2. It should be easy to add hypermedia to an existing JSON format
  3. JSON Hypermedia should support the properties of the Web, especially Visibility and Evolvability
  4. It should be possible to predict structure and not be hard-coded to it (microformat not schema)

These assumptions lead to very different styles than the JSON media formats being developed today like Siren and HAL. These formats essentially prescribe and define a container schema/format that application developers must then use to embed their own data within. We're exploring a different direction.