JSON v2: Difference between revisions

From John's wiki
Jump to navigation Jump to search
m (moved JSON to JSON v2)
(JSON v2)
Line 1: Line 1:
These are some thoughts on a JSON-based data-format that includes support for namespaces.
These are some thoughts on an improved JSON data-format that includes support for namespaces and schema description.


Thoughts:
Thoughts:

Revision as of 12:55, 8 July 2017

These are some thoughts on an improved JSON data-format that includes support for namespaces and schema description.

Thoughts:

  1. is it desirable to optionally include a JSON schema for a namespace? Schema could be either inline or a URL which would return the schema.
var data = {
  "json": {
    "version": 2,
    "namespace": {
      "default": "net.jj5.json.schema.example.v2",
      "ex": "com.example.json.schema.example.v1"
    },
    "data": {
      "people": [
        {
          "first_name": "John",
          "last_name": "Elliot",
          "ex:lucky_number": 37
        }
      ]
    }
  }
};