JMAP | R. Stepanek |
Internet-Draft | FastMail |
Intended status: Standards Track | M. Loffredo |
Expires: August 10, 2020 | IIT-CNR |
February 7, 2020 |
JSContact: A JSON representation of contact data
draft-ietf-jmap-jscontact-00
This specification defines a data model and JSON representation of contact card information that can be used for data storage and exchange in address book or directory applications. It aims to be an alternative to the vCard data format and to be unambiguous, extendable and simple to process. In contrast to the JSON-based jCard format, it is not a direct mapping from the vCard data model and expands semantics where appropriate.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on August 10, 2020.
Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document defines a data model for contact card data normally used in address book or directory applications and services. It aims to be an alternative to the vCard data format [RFC6350] and to provide a JSON-based standard representation of contact card data.
The key design considerations for this data model are as follows:
The representation of this data model is defined in the I-JSON format [RFC7493], which is a strict subset of the JavaScript Object Notation (JSON) Data Interchange Format [RFC8259]. Using JSON is mostly a pragmatic choice: its widespread use makes JSCard easier to adopt, and the availability of production-ready JSON implementations eliminates a whole category of parser-related interoperability issues.
The xCard [RFC6351] and jCard [RFC7095] specifications define alternative representations for vCard data, in XML and JSON format respectively. Both explicitly aim to not change the underlying data model. Accordingly, they are regarded as equal to vCard in the context of this document.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
Vendors MAY add additional properties to JSContact objects to support their custom features. The names of these properties MUST be prefixed with a domain name controlled by the vendor to avoid conflict, e.g. "example.com/customprop".
Some JSContact properties allow vendor-specific value extensions. If so, vendor-specific values MUST be prefixed with a domain name controlled by the vendor, e.g. "example.com/customrel".
Vendors are strongly encouraged to register any new property values or extensions that are useful to other systems as well, rather than using a vendor-specific prefix.
MIME type: application/jscontact+json;type=jscard
A JSCard object stores information about a person, organization or company.
Type: String (mandatory).
An identifier, used to associate the object as the same across different systems, addressbooks and views. [RFC4122] describes a range of established algorithms to generate universally unique identifiers (UUID), and the random or pseudo-random version is recommended. For compatibility with [RFC6350] UIDs, implementations MUST accept both URI and free-form text.
Type: String (optional).
The identifier for the product that created the JSCard object.
Type: String (optional).
The date and time when the data in this JSCard object was last modified. The timestamp MUST be formatted as specified in [RFC3339].
Type: String (optional). The kind of the entity the Card represents.
The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value:
Type: String[Relation] (optional).
Relates the object to other JSCard objects. This is represented as a map of the URI (or single text value) of the related objects to a possibly empty set of relation types. The Relation object has the following properties:
Note, the Relation object only has one property; it is specified as an object with a single property to allow for extension in the future.
Type: LocalizedString (optional).
The full name (e.g. the personal name and surname of an individual, the name of an organization) of the entity represented by this card.
Type: NameComponent[] (optional).
The name components of the name of the entity represented by this JSCard. Name components SHOULD be ordered such that their values joined by whitespace produce a valid full name of this entity.
A NameComponent has the following properties:
Type: LocalizedString[] (optional).
The company or organization name and units associated with this card. The first entry in the list names the organization, and any following entries name organizational units.
Type : LocalizedString[] (optional).
The job title(s) or functional position(s) of the entity represented by this card.
Type : LocalizedString[] (optional).
The role(s), function(s) or part(s) played in a particular situation by the entity represented by this card. In contrast to a job title, the roles might differ for example in project contexts.
Type: Resource[] (optional).
An array of Resource objects where the values are URLs in the [RFC6068] mailto scheme or free-text email addresses. Types are:
Type: Resource[] (optional).
An array of Resource objects where the values are URIs scheme or free-text phone numbers. Typical URI schemes are the [RFC3966] tel or [RFC3261] sip schemes, but any URI scheme is allowed. Resource types are:
The following labels are pre-defined for phone resources:
Type: Resource[] (optional).
An array of Resource objects where the values are URIs or usernames associated with the card for online services. Types are:
Type : String (optional)
Defines the preferred contact method or resource with additional information about this card. The value MUST be the property name of one of the Resource lists: emails, phones, online, other.
Type : String[ContactLanguage[]] (optional)
Defines the preferred languages for contacting the entity associated with this card. The keys in the object MUST be [RFC5646] language tags. The values are a (possibly empty) list of contact language preferences for this language. Also see the definition of the VCARD LANG property (Section 6.4.4., [RFC6350]).
A ContactLanguage object has the following properties:
A valid ContactLanguage object MUST have at least one of its properties set.
Type: Address[] (optional).
An array of Address objects, containing physical locations. An Address object has the following properties:
Type : Anniversary[] (optional).
Memorable dates and events for the entity represented by this card. An Anniversary object has the following properties:
Type: PersonalInformation[] (optional).
A list of personal information about the entity represented by this card. A PersonalInformation object has the following properties:
Type: LocalizedString[] (optional).
Arbitrary notes about the entity represented by this card.
Type: String[] (optional). A list of free-text or URI categories that relate to the card.
A LocalizedString object has the following properties:
A Resource object has the following properties:
MIME type: application/jscontact+json;type=jscardgroup
A JSCardGroup object represents a named set of JSCards.
Type : String (mandatory).
A globally unique identifier. The same requirements as for the JSCard uid property apply.
Type: String (optional).
The user-visible name for the group, e.g. "Friends". This may be any UTF-8 string of at least 1 character in length and maximum 255 octets in size. The same name may be used by two different groups.
Type : JSCard[] (mandatory). The cards in the group. Implementations MUST preserve the order of list entries.
NOTE: Please remove this section and the reference to [RFC7942] prior to publication as an RFC. This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC7942]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist. According to [RFC7942], "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".
TBD
TBD
[RFC2046] | Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, November 1996. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC4122] | Leach, P., Mealling, M. and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI 10.17487/RFC4122, July 2005. |
[RFC5646] | Phillips, A. and M. Davis, "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, September 2009. |
[RFC5870] | Mayrhofer, A. and C. Spanring, "A Uniform Resource Identifier for Geographic Locations ('geo' URI)", RFC 5870, DOI 10.17487/RFC5870, June 2010. |
[RFC6350] | Perreault, S., "vCard Format Specification", RFC 6350, DOI 10.17487/RFC6350, August 2011. |
[RFC6351] | Perreault, S., "xCard: vCard XML Representation", RFC 6351, DOI 10.17487/RFC6351, August 2011. |
[RFC7095] | Kewisch, P., "jCard: The JSON Format for vCard", RFC 7095, DOI 10.17487/RFC7095, January 2014. |
[RFC7493] | Bray, T., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015. |
[RFC7942] | Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: The Implementation Status Section", BCP 205, RFC 7942, DOI 10.17487/RFC7942, July 2016. |
[RFC8174] | Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017. |
[RFC8259] | Bray, T., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017. |