JSON-HC
draft-schuetze-json-hc-03

Document Type Active Internet-Draft (individual)
Last updated 2016-11-30
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                        J. Schuetze
Internet-Draft                                         November 30, 2016
Intended status: Informational
Expires: June 3, 2017

                                JSON-HC
                       draft-schuetze-json-hc-03

Abstract

   This document proposes a media type for representing JSON resources
   and relations with hypermedia controls.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on June 3, 2017.

Copyright Notice

   Copyright (c) 2016 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Schuetze                  Expires June 3, 2017                  [Page 1]
Internet-Draft                   JSON-HC                   November 2016

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Requirements  . . . . . . . . . . . . . . . . . . . . . . . .   2
   3.  JSON-HC Documents . . . . . . . . . . . . . . . . . . . . . .   2
   4.  Resource Objects  . . . . . . . . . . . . . . . . . . . . . .   3
   5.  Hypermedia Controls . . . . . . . . . . . . . . . . . . . . .   3
   6.  Embedded Resource Object  . . . . . . . . . . . . . . . . . .   4
   7.  Refresh a Resource Object . . . . . . . . . . . . . . . . . .   4
   8.  Target URL  . . . . . . . . . . . . . . . . . . . . . . . . .   4
   9.  Performing Actions  . . . . . . . . . . . . . . . . . . . . .   4
   10. Retrieve available HTTP methods . . . . . . . . . . . . . . .   4
   11. Profile of a Resource Object  . . . . . . . . . . . . . . . .   5
   12. Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .   5
   13. Security Considerations . . . . . . . . . . . . . . . . . . .   5
   14. Privacy Considerations  . . . . . . . . . . . . . . . . . . .   6
   15. Informative References  . . . . . . . . . . . . . . . . . . .   6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   7

1.  Introduction

   JSON Hypermedia Controls (JSON-HC) is a standard which establishes
   conventions for expressing hypermedia controls in JSON [RFC7159].

   The Hypermedia Controls of JSON-HC provide a way to figure out which
   Actions are possible with a Resource Object, what is the self URL of
   the Object and of which profile is the Resource Object.

2.  Requirements

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

3.  JSON-HC Documents

   A JSON-HC Document uses the format described in [RFC7159] and has the
   media type "application/vnd.hc+json".

   Its root object MUST be a Resource Object.

   For example:

Schuetze                  Expires June 3, 2017                  [Page 2]
Internet-Draft                   JSON-HC                   November 2016

         GET /orders/523 HTTP/1.1
         Host: example.org
         Accept: application/vnd.hc+json

         HTTP/1.1 200 OK
         Content-Type: application/vnd.hc+json

         {
           "self": "/orders/523",
           "profile": "https://example.org/rels/order",
           "https://example.org/rels/warehouse": "/warehouse/56",
           "https://example.org/rels/invoice": "/invoices/873",
           "currency": "USD",
Show full document text