idnits 2.17.1 draft-pbryan-zyp-json-ref-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 9, 2012) is 4428 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-09) exists of draft-ietf-appsawg-json-pointer-01 ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force P. Bryan, Ed. 3 Internet-Draft ForgeRock US, Inc. 4 Intended status: Informational K. Zyp 5 Expires: September 10, 2012 SitePen (USA) 6 March 9, 2012 8 JSON Reference 9 draft-pbryan-zyp-json-ref-02 11 Abstract 13 JSON Reference allows a JSON value to reference another JSON value in 14 a JSON document. 16 Status of this Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on September 10, 2012. 33 Copyright Notice 35 Copyright (c) 2012 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 3. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 4. Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 5. Error Handling . . . . . . . . . . . . . . . . . . . . . . . . 4 55 6. Media Type . . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 4 57 8. Security Considerations . . . . . . . . . . . . . . . . . . . . 4 58 9. Normative References . . . . . . . . . . . . . . . . . . . . . 4 59 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . 5 60 Appendix B. Examples . . . . . . . . . . . . . . . . . . . . . . . 5 61 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 5 63 1. Introduction 65 This specification defines a JSON [RFC4627] structure which allows a 66 JSON value to reference another JSON value in a JSON document. This 67 provides the basis for transclusion in JSON: the use of a target 68 resource as an effective substitute for the reference. 70 2. Conventions 72 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 73 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 74 document are to be interpreted as described in [RFC2119]. 76 3. Syntax 78 A JSON Reference is a JSON object, which contains a member named 79 "$ref", which has a JSON string value. Example: 81 { "$ref": "http://example.com/example.json#/foo/bar" } 83 If a JSON value does not have these characteristics, then it SHOULD 84 NOT be interpreted as a JSON Reference. 86 The "$ref" string value contains a URI [RFC3986], which identifies 87 the location of the JSON value being referenced. It is an error 88 condition if the string value does not conform to URI syntax rules. 89 Any members other than "$ref" in a JSON Reference object SHALL be 90 ignored. 92 4. Resolution 94 Resolution of a JSON Reference object SHOULD yield the referenced 95 JSON value. Implementations MAY choose to replace the reference with 96 the referenced value. 98 If the URI contained in the JSON Reference value is a relative URI, 99 then the base URI resolution MUST be calculated according to 100 [RFC3986], section 5.2. Resolution is performed relative to the 101 referring document. 103 If a URI contains a fragment identifier, then the fragment should be 104 resolved per the fragment resolution mechansim of the referrant 105 document. If the representation of the referrant document is JSON, 106 then the fragment identifier SHOULD be interpreted as a 107 [JSON-Pointer]. 109 5. Error Handling 111 In the event of an error condition, evaluation of the JSON Reference 112 SHOULD fail to complete. 114 6. Media Type 116 Documents that use JSON Reference SHOULD include a media type 117 parameter: application/json; profile=http://json-schema.org/json-ref 118 or refer to a schema that extends http://json-schema.org/json-ref. 120 7. IANA Considerations 122 This draft includes no request to IANA. 124 8. Security Considerations 126 A JSON Reference is not guaranteed to resolve to a JSON value. 127 Implementations of this specification SHOULD take appropriate 128 precautions. 130 Documents containing JSON References can be structured to resolve 131 cyclically. Implementations SHOULD include appropriate checks to 132 prevent such structures from resulting in infinite recursion or 133 iteration. 135 9. Normative References 137 [JSON-Pointer] 138 Bryan, P. and K. Zyp, "JSON Pointer", 139 draft-ietf-appsawg-json-pointer-01 (work in progress), 140 March 2012. 142 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 143 Requirement Levels", BCP 14, RFC 2119, March 1997. 145 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 146 Resource Identifier (URI): Generic Syntax", STD 66, 147 RFC 3986, January 2005. 149 [RFC4627] Crockford, D., "The application/json Media Type for 150 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 152 Appendix A. Acknowledgements 154 The authors acknowledge the following individuals for their 155 contributed feedback, which influenced this specification: 157 Bob Aman, Francis Galiegue. 159 Appendix B. Examples 161 TBD. 163 Authors' Addresses 165 Paul C. Bryan (editor) 166 ForgeRock US, Inc. 168 Phone: +1 604 783 1481 169 Email: pbryan@anode.ca 171 Kris Zyp 172 SitePen (USA) 174 Phone: +1 650 968 8787 175 Email: kris@sitepen.com