Relative JSON Pointers
draft-handrews-relative-json-pointer-00

Document Type Active Internet-Draft (individual)
Last updated 2017-11-27 (latest revision 2017-11-20)
Replaces draft-luff-relative-json-pointer
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)
Internet Engineering Task Force                                  G. Luff
Internet-Draft
Intended status: Informational                           H. Andrews, Ed.
Expires: May 23, 2018                                   Cloudflare, Inc.
                                                       November 19, 2017

                         Relative JSON Pointers
                draft-handrews-relative-json-pointer-00

Abstract

   JSON Pointer is a syntax for specifying locations in a JSON document,
   starting from the document root.  This document defines an extension
   to the JSON Pointer syntax, allowing relative locations from within
   the document.

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 https://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 May 23, 2018.

Copyright Notice

   Copyright (c) 2017 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
   (https://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.

Luff & Andrews            Expires May 23, 2018                  [Page 1]
Internet-Draft           Relative JSON Pointers            November 2017

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions and Terminology . . . . . . . . . . . . . . . . .   2
   3.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . .   2
   4.  Evaluation  . . . . . . . . . . . . . . . . . . . . . . . . .   3
   5.  JSON String Representation  . . . . . . . . . . . . . . . . .   4
     5.1.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .   4
   6.  Non-use in URI Fragment Identifiers . . . . . . . . . . . . .   5
   7.  Error Handling  . . . . . . . . . . . . . . . . . . . . . . .   5
   8.  Relationship to JSON Pointer  . . . . . . . . . . . . . . . .   5
   9.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   5
   10. Security Considerations . . . . . . . . . . . . . . . . . . .   5
   11. References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     11.1.  Normative References . . . . . . . . . . . . . . . . . .   6
     11.2.  Informative References . . . . . . . . . . . . . . . . .   6
   Appendix A.  ChangeLog  . . . . . . . . . . . . . . . . . . . . .   7
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   7

1.  Introduction

   JSON Pointer (RFC 6901 [RFC6901]) is a syntax for specifying
   locations in a JSON document, starting from the document root.  This
   document defines a related syntax allowing identification of relative
   locations from within the document.

2.  Conventions and Terminology

   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 RFC 2119 [RFC2119].

3.  Syntax

   A Relative JSON Pointer is a Unicode string (see RFC 4627, Section 3
   [RFC4627]), comprising a positive integer, followed by either a '#'
   (%x23) character or a JSON Pointer (RFC 6901 [RFC6901]).

   The separation between the integer prefix and the JSON Pointer will
   always be unambiguous, because a JSON Pointer must be either zero-
   length or start with a '/' (%x2F).  Similarly, a JSON Pointer will
   never be ambiguous with the '#'.

Luff & Andrews            Expires May 23, 2018                  [Page 2]
Internet-Draft           Relative JSON Pointers            November 2017

              The ABNF syntax of a Relative JSON Pointer is:

         relative-json-pointer =  positive-integer <json-pointer>
         relative-json-pointer =/ positive-integer "#"
         positive-integer      =  %x30 / %x31-39 *( %x30-39 )
                 ; "0", or digits without a leading "0"

     where <json-pointer> follows the production defined in RFC 6901,
                      Section 3 [RFC6901] ("Syntax").

4.  Evaluation
Show full document text