draft-ietf-appsawg-json-pointer-08.txt   draft-ietf-appsawg-json-pointer-09.txt 
Applications Area Working Group P. Bryan, Ed. Applications Area Working Group P. Bryan, Ed.
Internet-Draft Salesforce.com Internet-Draft Salesforce.com
Intended status: Standards Track K. Zyp Intended status: Standards Track K. Zyp
Expires: July 8, 2013 SitePen (USA) Expires: July 26, 2013 SitePen (USA)
M. Nottingham, Ed. M. Nottingham, Ed.
Akamai Akamai
January 4, 2013 January 22, 2013
JavaScript Object Notation (JSON) Pointer JavaScript Object Notation (JSON) Pointer
draft-ietf-appsawg-json-pointer-08 draft-ietf-appsawg-json-pointer-09
Abstract Abstract
JSON Pointer defines a string syntax for identifying a specific value JSON Pointer defines a string syntax for identifying a specific value
within a JavaScript Object Notation (JSON) document. within a JavaScript Object Notation (JSON) document.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 34 skipping to change at page 1, line 34
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 8, 2013. This Internet-Draft will expire on July 26, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 13 skipping to change at page 2, line 13
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5. JSON String Representation . . . . . . . . . . . . . . . . . . 5 5. JSON String Representation . . . . . . . . . . . . . . . . . . 5
6. URI Fragment Identifier Representation . . . . . . . . . . . . 6 6. URI Fragment Identifier Representation . . . . . . . . . . . . 6
7. Error Handling . . . . . . . . . . . . . . . . . . . . . . . . 6 7. Error Handling . . . . . . . . . . . . . . . . . . . . . . . . 7
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7
9. Security Considerations . . . . . . . . . . . . . . . . . . . . 7 9. Security Considerations . . . . . . . . . . . . . . . . . . . . 7
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7
11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8
11.1. Normative References . . . . . . . . . . . . . . . . . . . 7 11.1. Normative References . . . . . . . . . . . . . . . . . . . 8
11.2. Informative References . . . . . . . . . . . . . . . . . . 8 11.2. Informative References . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 8
1. Introduction 1. Introduction
This specification defines JSON Pointer, a string syntax for This specification defines JSON Pointer, a string syntax for
identifying a specific value within a JavaScript Object Notation identifying a specific value within a JavaScript Object Notation
(JSON) [RFC4627] document. It is intended to be easily expressed in (JSON) [RFC4627] document. It is intended to be easily expressed in
JSON string values as well as Uniform Resource Identifier (URI) JSON string values as well as Uniform Resource Identifier (URI)
[RFC3986] fragment identifiers. [RFC3986] fragment identifiers.
skipping to change at page 4, line 23 skipping to change at page 4, line 23
turning '~01' first into '~1' and then into '/', which would be turning '~01' first into '~1' and then into '/', which would be
incorrect (the string '~01' correctly becomes '~1' after incorrect (the string '~01' correctly becomes '~1' after
transformation). transformation).
The reference token then modifies which value is referenced according The reference token then modifies which value is referenced according
to the following scheme: to the following scheme:
o If the currently referenced value is a JSON object, the new o If the currently referenced value is a JSON object, the new
referenced value is the object member with the name identified by referenced value is the object member with the name identified by
the reference token. The member name is equal to the token if it the reference token. The member name is equal to the token if it
has the same number of Unicode characters as token and their code has the same number of Unicode characters as the token and their
points are position-wise equal. No Unicode character code points are position-wise equal. No Unicode character
normalization is performed. If a referenced member name is not normalization is performed. If a referenced member name is not
unique in an object, the member that is referenced is undefined, unique in an object, the member that is referenced is undefined,
and evaluation fails (see below). and evaluation fails (see below).
o If the currently referenced value is a JSON array, the reference o If the currently referenced value is a JSON array, the reference
token MUST contain either: token MUST contain either:
* characters comprised of digits (see ABNF below; note that * characters comprised of digits (see ABNF below; note that
leading zeros are not allowed) that represent an unsigned leading zeros are not allowed) that represent an unsigned
base-10 integer value, making the new referenced value the base-10 integer value, making the new referenced value the
skipping to change at page 4, line 47 skipping to change at page 4, line 47
* exactly the single character "-", making the new referenced * exactly the single character "-", making the new referenced
value the (non-existant) member after the last array element. value the (non-existant) member after the last array element.
The ABNF syntax for array indices is: The ABNF syntax for array indices is:
array-index = %x30 / ( %x31-39 *(%x30-39) ) array-index = %x30 / ( %x31-39 *(%x30-39) )
; "0", or digits without a leading "0" ; "0", or digits without a leading "0"
Implementations will evaluate each reference token against the Implementations will evaluate each reference token against the
document's contents, and terminate evaluation with an error condition document's contents, and will raise an error condition if it fails to
if it fails to resolve a concrete value for any of the JSON pointer's resolve a concrete value for any of the JSON pointer's reference
reference tokens. For example, if an array is referenced with a non- tokens. For example, if an array is referenced with a non-numeric
numeric token, it will fail. See Section 7 for details. token, an error condition will be raised. See Section 7 for details.
Note that the use of the "-" character to index an array will always Note that the use of the "-" character to index an array will always
result in such an error; applications of JSON Pointer thus need to result in such an error condition because by definition it refers to
specify how it is to be handled, if it is to be useful. a non-existent array element. Applications of JSON Pointer thus need
to specify how it is to be handled, if it is to be useful.
Any error condition that does not have a specific action defined for
it by the JSON Pointer application results in termination of
evaluation.
5. JSON String Representation 5. JSON String Representation
A JSON Pointer can be represented in a JSON string value. Per A JSON Pointer can be represented in a JSON string value. Per
[RFC4627], Section 2.5, all instances of quotation mark '"' (%x22), [RFC4627], Section 2.5, all instances of quotation mark '"' (%x22),
reverse solidus '\' (%x5C) and control (%x00-1F) characters MUST be reverse solidus '\' (%x5C) and control (%x00-1F) characters MUST be
escaped. escaped.
Note that before processing a JSON string as a JSON Pointer, Note that before processing a JSON string as a JSON Pointer,
backslash escape sequences must be unescaped. backslash escape sequences must be unescaped.
 End of changes. 9 change blocks. 
15 lines changed or deleted 20 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/