idnits 2.17.1 draft-hallambaker-scijer-00.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 == Line 153 has weird spacing: '...#, Java int o...' == Line 159 has weird spacing: '...#, Java float...' == Line 259 has weird spacing: '...#, Java byte ...' -- The document date (July 31, 2012) is 4279 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC1035' is defined on line 273, but no explicit reference was found in the text Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force P. Hallam-Baker 3 Internet-Draft Comodo Group Inc. 4 Intended status: Standards Track July 31, 2012 5 Expires: February 1, 2013 7 Simple Cloud Interoperable Jason Encoding for REST Web Services (SCIJER) 8 Bindings 9 draft-hallambaker-scijer-00 11 Abstract 13 SCIJER (pronounced skyjer) specifies a mapping of data types to 14 JavaScript Object Notation (JSON) encoding. The JSON specification 15 defines encodings for integers, strings, arrays and objects. This 16 document specifies a mapping between JSON encoding and an extended 17 set of types. 19 Status of this Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on February 1, 2013. 36 Copyright Notice 38 Copyright (c) 2012 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (http://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 1.1. Requirements Language . . . . . . . . . . . . . . . . . . . 3 55 1.2. Defined Terms . . . . . . . . . . . . . . . . . . . . . . . 3 56 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 3. Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3.1. Object . . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 3.2. Serializable . . . . . . . . . . . . . . . . . . . . . . . 3 60 3.2.1. Array . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3.2.2. List . . . . . . . . . . . . . . . . . . . . . . . . . 4 62 3.3. Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 3.4. Integer . . . . . . . . . . . . . . . . . . . . . . . . . . 4 64 3.5. Floating Point . . . . . . . . . . . . . . . . . . . . . . 4 65 3.6. String . . . . . . . . . . . . . . . . . . . . . . . . . . 4 66 3.6.1. URI . . . . . . . . . . . . . . . . . . . . . . . . . . 5 67 3.6.2. Label . . . . . . . . . . . . . . . . . . . . . . . . . 5 68 3.6.3. Name . . . . . . . . . . . . . . . . . . . . . . . . . 5 69 3.7. Enumeration . . . . . . . . . . . . . . . . . . . . . . . . 5 70 3.8. Time . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 71 3.8.1. DateTime . . . . . . . . . . . . . . . . . . . . . . . 6 72 3.8.2. ElapsedTime . . . . . . . . . . . . . . . . . . . . . . 6 73 3.9. Binary . . . . . . . . . . . . . . . . . . . . . . . . . . 6 74 3.10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 75 4. Security Considerations . . . . . . . . . . . . . . . . . . . . 7 76 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 77 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 7 78 7. Normative References . . . . . . . . . . . . . . . . . . . . . 7 79 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 7 81 1. Definitions 83 1.1. Requirements Language 85 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 86 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 87 document are to be interpreted as described in [RFC2119]. 89 1.2. Defined Terms 91 The following terms are used in this document: 93 2. Introduction 95 JSON is a format for encoding data structures in UTF8 text format 96 with similar capabilities to XML and ASN.1 but with lower coding 97 overhead. Unlike XML and ASN.1, JSON does not have a schema 98 language. 100 This draft defines a mapping between JSON data types and programming 101 language types that MAY be used as the basis for a schema language 102 definition. 104 3. Bindings 106 Specify conversions between JSON encoding and C, C# and Java types. 108 3.1. Object 110 JSON 112 C 114 C# 116 Java 118 3.2. Serializable 120 3.2.1. Array 121 JSON 123 C 125 C# 127 Java 129 3.2.2. List 131 JSON 133 C 135 C# 137 Java 139 3.3. Boolean 141 JSON true | false 143 C int 145 C# bool 147 C# boolean 149 3.4. Integer 151 JSON number without decimal point 153 C, C#, Java int or long 155 3.5. Floating Point 157 JSON number with decimal point 159 C, C#, Java float or double 161 3.6. String 163 The String type maps to the JSON string encoding. The following 164 subtypes are defined to represent commonly used syntactic 165 restrictions. 167 JSON String encoding 169 C char * [NB must use appropriate wrappers to encode/decode UTF8] 171 C#, Java String 173 URI 175 Label 177 Name 179 3.6.1. URI 181 A URI is a string that contains a URI as specified in [RFC3986]. 183 3.6.2. Label 185 A label is a string that MUST NOT contain any ASCII character other 186 than digits (0-9), alphabetic (a-z, A-Z), underscore or dash. All 187 other UNICODE characters are permitted. 189 The Label type provide a means of avoiding content injection attacks 190 by ensuring that a field does not contain characters commonly used as 191 control characters in scripting languages. 193 3.6.3. Name 195 A Name is a sequence of Labels separated by period characters '.'. 197 Note that the syntactic restriction of a Name is not exactly the same 198 as the restriction on a DNS address. 200 3.7. Enumeration 202 An enumeration is encoded as a Label. 204 3.8. Time 206 SSCIJER supports two encodings 208 DateTime A string encoded in [RFC3339] format. This provides a 209 human readable representation. 211 ElapsedTime A number that represents the number of seconds that have 212 elapsed since January 1, 0001 at 00:00:00.000 in the Gregorian 213 calendar. Decimals MAY be used to represent time intervals of 214 less than a second. 216 Conversion between the two encodings MUST be informed by the times at 217 which leap seconds were introduced into the UTC coding. This creates 218 a challenge in the case that a device only has access to time in one 219 form but not the other. 221 In order to address this problem, implementations MUST accept time 222 values encoded in either format and SHOULD emit the encoding 223 specified in the schema. 225 3.8.1. DateTime 227 JSON String [Encoded in [RFC3339] format.] 229 C System dependent 231 C# DateTime 233 Java Date 235 Represents a date and time in the Gregorian callendar using the 236 format described in [RFC3339]. 238 3.8.2. ElapsedTime 240 JSON Number 242 C System dependent 244 C# DateTime 246 Java Date 248 A number that represents the number of seconds that have elapsed 249 since January 1, 0001 at 00:00:00.000 in the Gregorian calendar. 250 Decimals MAY be used to represent time intervals of less than a 251 second. 253 3.9. Binary 255 JSON String [Base64 encoding of binary data] 257 C {unsigned char *, length} 259 C#, Java byte [] 261 3.10. 263 4. Security Considerations 265 5. IANA Considerations 267 6. Acknowledgements 269 The name of this draft was inspired by Mark Nottingham. 271 7. Normative References 273 [RFC1035] Mockapetris, P., "Domain names - implementation and 274 specification", STD 13, RFC 1035, November 1987. 276 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 277 Requirement Levels", BCP 14, RFC 2119, March 1997. 279 [RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the 280 Internet: Timestamps", RFC 3339, July 2002. 282 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 283 Resource Identifier (URI): Generic Syntax", STD 66, 284 RFC 3986, January 2005. 286 Author's Address 288 Phillip Hallam-Baker 289 Comodo Group Inc. 291 Email: philliph@comodo.com