idnits 2.17.1 draft-stepanek-jscontact-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 -- The document date (February 28, 2019) is 1882 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TBD R. Stepanek 3 Internet-Draft FastMail 4 Intended status: Standards Track February 28, 2019 5 Expires: September 1, 2019 7 JSContact: A JSON representation of addressbook data 8 draft-stepanek-jscontact-00 10 Abstract 12 This specification defines a data model and JSON representation of 13 contact information that can be used for data storage and exchange in 14 address book or directory applications. It aims to be an alternative 15 to the vCard data format and to be unambiguous, extendable and simple 16 to process. In contrast to the JSON-based jCard format, it is not a 17 direct mapping from the vCard data model and expands semantics where 18 appropriate. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on September 1, 2019. 37 Copyright Notice 39 Copyright (c) 2019 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Relation to the xCard and jCard formats . . . . . . . . . 3 56 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 57 2. Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3. Contact Group . . . . . . . . . . . . . . . . . . . . . . . . 7 59 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 60 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 61 6. Normative References . . . . . . . . . . . . . . . . . . . . 7 62 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 8 64 1. Introduction 66 This document defines a data model for contact data normally used in 67 address book or directory applications and services. It aims to be 68 an alternative to the vCard data format [RFC6350] and to provide a 69 JSON-based standard representation of contacts data. 71 The key design considerations for this data model are as follows: 73 o Most of the initial set of attributes should be taken from the 74 vCard data format [RFC6350], but the specification should add new 75 attributes or value types, or not support existing ones, where 76 appropriate. Conversion between the data formats need not fully 77 preserve semantic meaning. 79 o The attributes of the contacts data represented must be described 80 as a simple key-value pair, reducing complexity of its 81 representation. 83 o The data model should avoid all ambiguities and make it difficult 84 to make mistakes during implementation. 86 o Extensions, such as new properties and components, MUST NOT lead 87 to requiring an update to this document. 89 The representation of this data model is defined in the I-JSON format 90 [RFC7493], which is a strict subset of the JavaScript Object Notation 91 (JSON) Data Interchange Format [RFC8259]. Using JSON is mostly a 92 pragmatic choice: its widespread use makes JSContact easier to adopt, 93 and the availability of production-ready JSON implementations 94 eliminates a whole category of parser-related interoperability 95 issues. 97 1.1. Relation to the xCard and jCard formats 99 The xCard [RFC6351] and jCard [RFC7095] specifications define 100 alternative representations for vCard data, in XML and JSON format 101 respectively. Both explicitly aim to not change the underlying data 102 model. Accordingly, they are regarded as equal to vCard in the 103 context of this document. 105 1.2. Terminology 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 109 "OPTIONAL" in this document are to be interpreted as described in BCP 110 14 [RFC2119] [RFC8174] when, and only when, they appear in all 111 capitals, as shown here. 113 2. Contact 115 MIME type: "application/jscontact+json;type=jscontact" 117 A *JSContact* object stores contact information about a person or 118 company. It has the following properties: 120 o *uid*: "String" A globally unique identifier, used to associate 121 the object as the same across different systems, addressbooks and 122 views. The value of this property MUST be unique across _all_ 123 JSContact objects. [RFC4122] describes a range of established 124 algorithms to generate universally unique identifiers (UUID), and 125 the random or pseudo-random version is recommended. For 126 compatibility with [RFC6350] UIDs, implementations MUST accept 127 both URI and free-form text. A valid JSContact object MUST 128 include this property. 130 o *prefix*: "String" (optional) The honorific title of the contact, 131 e.g. "Mr", "Ms", "Dr", etc. 133 o *firstName*: "String" (optional) The first name(s) of a contact. 135 o *lastName*: "String" (optional) The last name of a contact. 137 o *suffix*: "String" (optional) The honorific suffix of the contact, 138 e.g. "B.A.", "Esq." etc. 140 o *nickname*: "String" (optional) The nickname of the contact. 142 o *birthday*: "String" (optional) The person's birth date in the 143 form ""YYYY-MM-DD"" (any part may be all "0"s for unknown). 145 o *anniversary*: "String" (optional) The person's anniversary date 146 in the form ""YYYY-MM-DD"" (any part may be all "0"s for unknown). 148 o *company*: "String" (optional) The company for which the person 149 works. 151 o *department*: "String" (optional) The department within the 152 company for which the person works. 154 o *jobTitle*: "String" (optional) The job title of the person. 156 o *emails*: "ContactInformation[]" (optional) An array of 157 ContactInformation objects where the values are email addresses. 158 Types are: 160 * ""personal"" The address is for emailing the person in a 161 personal context. 163 * ""work"" The address is for emailing the person in a 164 professional context. 166 * ""other"" The address is for some other purpose. A _label_ 167 property MAY be included to display next to the address to help 168 the user identify its purpose. 170 o *phones*: "ContactInformation[]" (optional) An array of 171 ContactInformation objects where the values are phone numbers. 172 Types are: 174 * ""home"" The number is for contacting the person at their 175 residence. 177 * ""work"" The number is for contacting the person at their 178 workplace. 180 * ""mobile"" The number is for contacting the person regardless 181 of location. 183 * ""fax"" The number is for sending faxes to the contact. 185 * ""pager"" The number is for a pager or beeper associated with 186 the contact. 188 * ""other"" The number is for some other purpose. A _label_ 189 property MAY be included to display next to the number to help 190 the user identify its purpose. 192 o *online*: "ContactInformation[]" (optional) An array of 193 ContactInformation objects where the values are URIs or usernames 194 associated with the person for online services. Types are: 196 * ""uri"" The value is a URI, e.g. a website link. 198 * ""username"" The value is a username associated with the person 199 (e.g. for social media, or an IM client). A _label_ property 200 SHOULD be included to identify what service this is for. For 201 compatibility between clients, this label SHOULD be the 202 canonical service name, including capitalisation. e.g. 203 ""Twitter"", ""Facebook"", ""Skype"", ""GitHub"", ""XMPP"". 205 * ""other"" The value is something else not covered by the above 206 categories. A _label_ property MAY be included to display next 207 to the number to help the user identify its purpose. 209 o *addresses*: "Address[]" (optional) An array of Address objects, 210 containing physical locations associated with the person. Types 211 are: 213 * ""home"" An address of a residence associated with the person. 215 * ""work"" An address of a workplace associated with the person. 217 * ""billing"" An address to be used with billing associated with 218 the person. 220 * ""postal"" An address to be used for delivering physical items 221 to the person. 223 * ""other"" An address not covered by the above categories. 225 o *notes*: "String" (optional) Arbitrary notes about the contact. 227 A *ContactInformation* object has the following properties: 229 o *type*: "String" Specifies the context of the contact information. 230 This MUST be taken from the set of values allowed depending on 231 whether this is part of the _phones_, _emails_ or _online_ 232 property (see above). 234 o *label*: "String" (optional) A label describing the value in more 235 detail, especially if "type === "other"" (but MAY be included with 236 any type). 238 o *value*: "String" The actual contact information, e.g. the email 239 address or phone number. 241 o *isDefault*: "Boolean" (optional, default: "false") Whether this 242 _ContactInformation_ is the default for its type. This SHOULD 243 only be one per type. 245 An *Address* object has the following properties: 247 o *type*: "String" Specifies the context of the address information. 248 This MUST be taken from the set of values allowed (see above). 250 o *label*: "String" (optional) A label describing the value in more 251 detail, especially if "type === "other"" (but MAY be included with 252 any type). 254 o *street*: "String" (optional) The street address. This MAY be 255 multiple lines; newlines MUST be preserved. 257 o *locality*: "String" (optional) The city, town, village, post 258 town, or other locality within which the street address may be 259 found. 261 o *region*: "String" (optional) The province, such as a state, 262 county, or canton within which the locality may be found. 264 o *postcode*: "String" (optional) The postal code, post code, ZIP 265 code or other short code associated with the address by the 266 relevant country's postal system. 268 o *country*: "String" (optional) The country name. 270 o *isDefault*: "Boolean" (optional, default: "false") Whether this 271 _Address_ is the default for its type. This SHOULD only be one 272 per type. 274 A *File* Object has the following properties: 276 o *href*: "String" A URI from which the resource may be fetched. 277 This MAY be a "data:" URL, but it is recommended that the file be 278 hosted on a server to avoid embedding arbitrarily large data in 279 JSContact object instances. 281 o *type*: "String" (optional) The content-type of the file, if 282 known. 284 o *name*: "String" (optional) The full file name, if known. e.g. 285 "myface.png" 287 o *size*: "Number" (optional) The positive integer size, in octets, 288 of the file when fully decoded (i.e. the number of octets in the 289 file the user would download), if known. 291 3. Contact Group 293 MIME type: "application/jscontact+json;type=jscontactgroup" 295 A *JSContactGroup* object represents a named set of contacts. It has 296 the following properties: 298 o *uid*: String A globally unique identifier. The same requirements 299 as for the JSContact *uid* property apply. A valid JSContactGroup 300 object MUST include this property. 302 o *name*: "String" (optional) The user-visible name for the group, 303 e.g. "Friends". This may be any UTF-8 string of at least 1 304 character in length and maximum 255 octets in size. The same name 305 may be used by two different groups. 307 o *contactIds*: "String[]" The ids of the contacts in the group. 308 Implementations MUST preserve the order of list entries. 310 4. IANA Considerations 312 TBD 314 5. Security Considerations 316 TBD 318 6. Normative References 320 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 321 Requirement Levels", BCP 14, RFC 2119, 322 DOI 10.17487/RFC2119, March 1997, 323 . 325 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 326 Unique IDentifier (UUID) URN Namespace", RFC 4122, 327 DOI 10.17487/RFC4122, July 2005, 328 . 330 [RFC6350] Perreault, S., "vCard Format Specification", RFC 6350, 331 DOI 10.17487/RFC6350, August 2011, 332 . 334 [RFC6351] Perreault, S., "xCard: vCard XML Representation", 335 RFC 6351, DOI 10.17487/RFC6351, August 2011, 336 . 338 [RFC7095] Kewisch, P., "jCard: The JSON Format for vCard", RFC 7095, 339 DOI 10.17487/RFC7095, January 2014, 340 . 342 [RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, 343 DOI 10.17487/RFC7493, March 2015, 344 . 346 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 347 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 348 May 2017, . 350 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 351 Interchange Format", STD 90, RFC 8259, 352 DOI 10.17487/RFC8259, December 2017, 353 . 355 Author's Address 357 Robert Stepanek 358 FastMail 359 PO Box 234, Collins St West 360 Melbourne VIC 8007 361 Australia 363 Email: rsto@fastmailteam.com