Skip to content

Commit ab038e9

Browse files
committed
define JGF media type and profile param usage
fixes #14
1 parent ebaa8e2 commit ab038e9

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,25 @@ Schema
288288

289289
The `JSON graph schema`_ (version 3) is provided for the json graph format.
290290

291+
Media Type
292+
----------
293+
294+
The media type to describe JSON Graph Format is *application/vnd.jgf+json*. The approach to use a media type suffix like *+json* is described by `RFC 6839`_.
295+
296+
In addition to the media type a *profile* media type parameter MUST be set to a URL that dereferences to the JSON schema for JSON Graph Format. The expected usage of the *profile* media type parameter is defined by `RFC 6906`_. For example to communicate plain JSON Graph Format content the *Content-Type* header could be set as:
297+
298+
.. code-block:: http
299+
300+
Content-Type: application/vnd.jgf+json;
301+
302+
A child schema of JSON Graph Format can communicate its JSON schema using additional *profile* media type parameters. Each *profile* media type parameter MUST dereference a JSON schema. For example the BEL JSON Graph Format could be communicated as:
303+
304+
.. code-block:: http
305+
306+
Content-Type: application/vnd.jgf+json;
307+
profile=http://jsongraphformat.info/schema.json;
308+
profile=http://jsongraphformat.info/child-schemas/bel-json-graph.schema.json
309+
291310
Project Tests
292311
-------------
293312

@@ -304,3 +323,5 @@ Links
304323
.. _JSON schema: http://json-schema.org
305324
.. _real world examples: https://github.com/jsongraph/json-graph-specification/tree/master/examples
306325
.. _TESTING: https://github.com/jsongraph/json-graph-specification/blob/master/TESTING.rst
326+
.. _RFC 6839: https://tools.ietf.org/html/rfc6839
327+
.. _RFC 6906: https://tools.ietf.org/html/rfc6906

0 commit comments

Comments
 (0)