idnits 2.17.00 (12 Aug 2021) /tmp/idnits58802/draft-pbryan-zyp-json-ref-03.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 (September 16, 2012) is 3533 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: draft-ietf-appsawg-json-pointer has been published as RFC 6901 ** 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 Salesforce.com 4 Intended status: Informational K. Zyp 5 Expires: March 20, 2013 SitePen (USA) 6 September 16, 2012 8 JSON Reference 9 draft-pbryan-zyp-json-ref-03 11 Abstract 13 JSON Reference allows a JSON value to reference another value in a 14 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 March 20, 2013. 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. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 4 56 7. Security Considerations . . . . . . . . . . . . . . . . . . . . 4 57 8. Normative References . . . . . . . . . . . . . . . . . . . . . 4 58 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . 4 59 Appendix B. Examples . . . . . . . . . . . . . . . . . . . . . . . 5 60 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 5 62 1. Introduction 64 This specification defines a JSON [RFC4627] structure which allows a 65 JSON value to reference another value in a JSON document. This 66 provides the basis for transclusion in JSON: the use of a target 67 resource as an effective substitute for the reference. 69 2. Conventions 71 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 72 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 73 document are to be interpreted as described in [RFC2119]. 75 3. Syntax 77 A JSON Reference is a JSON object, which contains a member named 78 "$ref", which has a JSON string value. Example: 80 { "$ref": "http://example.com/example.json#/foo/bar" } 82 If a JSON value does not have these characteristics, then it SHOULD 83 NOT be interpreted as a JSON Reference. 85 The "$ref" string value contains a URI [RFC3986], which identifies 86 the location of the JSON value being referenced. It is an error 87 condition if the string value does not conform to URI syntax rules. 88 Any members other than "$ref" in a JSON Reference object SHALL be 89 ignored. 91 4. Resolution 93 Resolution of a JSON Reference object SHOULD yield the referenced 94 JSON value. Implementations MAY choose to replace the reference with 95 the referenced value. 97 If the URI contained in the JSON Reference value is a relative URI, 98 then the base URI resolution MUST be calculated according to 99 [RFC3986], section 5.2. Resolution is performed relative to the 100 referring document. 102 If a URI contains a fragment identifier, then the fragment should be 103 resolved per the fragment resolution mechansim of the referrant 104 document. If the representation of the referrant document is JSON, 105 then the fragment identifier SHOULD be interpreted as a 106 [JSON-Pointer]. 108 5. Error Handling 110 In the event of an error condition, evaluation of the JSON Reference 111 SHOULD fail to complete. 113 6. IANA Considerations 115 This draft includes no request to IANA. 117 7. Security Considerations 119 A JSON Reference is not guaranteed to resolve to a JSON value. 120 Implementations of this specification SHOULD take appropriate 121 precautions. 123 Documents containing JSON References can be structured to resolve 124 cyclically. Implementations SHOULD include appropriate checks to 125 prevent such structures from resulting in infinite recursion or 126 iteration. 128 8. Normative References 130 [JSON-Pointer] 131 Bryan, P., Zyp, K., and M. Nottingham, "JSON Pointer", 132 draft-ietf-appsawg-json-pointer-04 (work in progress), 133 September 2012. 135 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 136 Requirement Levels", BCP 14, RFC 2119, March 1997. 138 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 139 Resource Identifier (URI): Generic Syntax", STD 66, 140 RFC 3986, January 2005. 142 [RFC4627] Crockford, D., "The application/json Media Type for 143 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 145 Appendix A. Acknowledgements 147 The following individuals contributed ideas, feedback and wording to 148 this specification: 150 Bob Aman, Francis Galiegue. 152 Appendix B. Examples 154 TBD. 156 Authors' Addresses 158 Paul C. Bryan (editor) 159 Salesforce.com 161 Phone: +1 604 783 1481 162 Email: pbryan@anode.ca 164 Kris Zyp 165 SitePen (USA) 167 Phone: +1 650 968 8787 168 Email: kris@sitepen.com