Network Working Group R. Sayre
Internet-Draft Mozilla Corporation
Intended status: Experimental October 10, 2006
Expires: April 13, 2007
JSON Uniform Messaging Protocol (JUMP)
draft-sayre-jump-02.txt
Status of this Memo
By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
This document may not be modified, and derivative works of it may not
be created.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
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."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on April 13, 2007.
Copyright Notice
Copyright (C) The Internet Society (2006).
Sayre Expires April 13, 2007 [Page 1]
Internet-Draft JUMP October 2006
Abstract
JUMP uses HTTP and a lightweight layout for JSON records to edit the
Web.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Requirements notation . . . . . . . . . . . . . . . . . . . . 4
3. JUMP Records . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Standard Fields . . . . . . . . . . . . . . . . . . . . . 6
3.1.1. The 'type' Field . . . . . . . . . . . . . . . . . . . 6
3.1.2. Text Fields . . . . . . . . . . . . . . . . . . . . . 6
3.1.3. Other Fields . . . . . . . . . . . . . . . . . . . . . 7
3.2. Extension Fields . . . . . . . . . . . . . . . . . . . . . 7
4. Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.1. Annotated Arrays . . . . . . . . . . . . . . . . . . . . . 8
4.2. Nesting . . . . . . . . . . . . . . . . . . . . . . . . . 9
5. Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1. Editing Single Records . . . . . . . . . . . . . . . . . . 11
5.2. Editing Arrays . . . . . . . . . . . . . . . . . . . . . . 11
6. Security Considerations . . . . . . . . . . . . . . . . . . . 12
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
7.1. application/jump . . . . . . . . . . . . . . . . . . . . . 13
7.2. application/jumparray . . . . . . . . . . . . . . . . . . 14
8. Normative References . . . . . . . . . . . . . . . . . . . . . 15
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 16
Intellectual Property and Copyright Statements . . . . . . . . . . 17
Sayre Expires April 13, 2007 [Page 2]
Internet-Draft JUMP October 2006
1. Introduction
JSON [RFC4627] provides an interoperable object serialization format
capable of representing numbers, strings, arrays, and a wide range of
Unicode characters. This specification defines a loosely-coupled
protocol based on a small set of conventions for JSON records and a
profile of HTTP.
Sayre Expires April 13, 2007 [Page 3]
Internet-Draft JUMP October 2006
2. Requirements notation
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
Sayre Expires April 13, 2007 [Page 4]
Internet-Draft JUMP October 2006
3. JUMP Records
An example JUMP record:
{
"title": "Example",
"text": "Text and link.",
"link": "http://example.com/my.html",
"media": "http://example.com/my.jpg",
"id": ["B1549145-55CB-4A6B-9526-70D370821BB5"],
"type": ["object"],
"sync": "88C3865F-05A6-4E5C-8867-0FAC9AE264FC",
"tags": ["foo","bar"],
"self": "http://example.com/42.jump",
"edit": "http://example.com/edit.cgi/42"
}
Detailed field definitions can be found in Section 3.1.
It is sometimes necessary to annotate fields themselves, so JUMP
defines an alternative to the literal syntax presented above.
An example JUMP record using extension fields to annotate complex
field values:
{
"title": {
"type": "text",
"value": "Example"
},
"text": {
"type": "html",
"value": "Text and link."
},
"link": {
"quux-x": "baz",
"value": "http://example.com/my.html"
},
"media": "http://example.com/my.jpg",
"id": ["B1549145-55CB-4A6B-9526-70D370821BB5"],
"type": ["object"],
"sync": "88C3865F-05A6-4E5C-8867-0FAC9AE264FC",
"tags": ["foo","bar"],
"edit": "http://example.com/edit.cgi/42"
}
No JUMP field is required for every record, but interoperability will
increase as the number of standard fields increases. Thus, a record
containing zero standard fields is very unlikely to interoperate with
any given JUMP implementation. Records without 'title' or 'text'
Sayre Expires April 13, 2007 [Page 5]
Internet-Draft JUMP October 2006
fields are also unlikely to interoperate with an independently-
developed JUMP implementation. Guidelines for extension fields are
detailed in Section 3.2.
3.1. Standard Fields
3.1.1. The 'type' Field
The 'type' field denotes the type its containing object. JUMP
records have a default type of "object".
"type": "object"
Annotated JUMP arrays (Section 4.1) MUST contain the value "array".
"type": "array"
The 'type' field can have an array as its value, in which case the
containing object is considered to be the union of its values. For
example, the following example shows a type field that contains the
"array" value required by JUMP arrays:
"type": ["array", "quux-extendo"]
JUMP records and fields SHOULD contain general type values whenever
possible, so that independent implementations can interoperate to
some degree. Additionaly, type names should be suitable for use as a
MIME parameter value.
3.1.2. Text Fields
Text fields are based on the Text Constructs found in RFC 4287,
section 3.1 [RFC4287]. The type value has three permited values:
'text', 'html', and 'xhtml'. All other values MUST be interpreted as
'html'.
XHTML text fields are not required to have a root element, and a
default namespace of 'http://www.w3.org/xhtml/1999' is implicit in
the absence of an overriding XML Namespace declaration.
'title' A text field containing the title of the record. If its
value is not annotated with a 'type' field, a type value of 'text'
is implied.
'text' A text field containing the content or description of the
record. If its value is not annotated with a 'type' field, a type
value of 'html' is implied.
Sayre Expires April 13, 2007 [Page 6]
Internet-Draft JUMP October 2006
3.1.3. Other Fields
@tbd. Not hard to predict. Borrow from email and Atom as needed.
'author' If 'author' has a simple value, its value is taken to be
the equivalent of the 'name' element specified in the Atom
Syndication Format [RFC4287]. If its value is an object, the
'value' field corresponds to the author 'name'. 'email' and 'uri'
are as specified in the Atom Syndication Format [RFC4287]. If the
value is an array, there are multiple authors.
'contributor' As specified for author, with a different field name.
'edit' A URI [RFC3986] or IRI [RFC3987] used to edit the record.
See Section 5 for a description of JUMP's HTTP-based editing
protocol.
'id' One or more permanent identifiers associated with the record.
'link' A URI [RFC3986] or IRI [RFC3987] used to view the record in a
Web browser.
'media' The URI [RFC3986] or IRI [RFC3987] of a media object
associated with the record.
'published' A string (or object with string value) containing a
timestamp formatted as an Atom Syndication Format date [RFC4287].
'self' A URI [RFC3986] or IRI [RFC3987] where a read-only version of
the record is present.
'sync' A string (or object with string value) containing a token for
clients to use when identifing versions of a record, as with the
HTTP Etag header [RFC2616].
'updated' A string (or object with string value) containing a
timestamp formatted as an Atom Syndication Format date [RFC4287].
Values corresponding to the record's HTTP Last-Modified date are
acceptable here.
'tags' An array of strings or objects (with string values)
indicating labels that have been assigned to the record.
3.2. Extension Fields
Sayre Expires April 13, 2007 [Page 7]
Internet-Draft JUMP October 2006
4. Arrays
Sequences of JUMP records are denoted using JSON array syntax.
[
{
"title": "Example",
"text": "Text and link.",
"link": "http://example.com/my.html",
"media": "http://example.com/my.jpg",
"id": ["B1549145-55CB-4A6B-9526-70D370821BB5"],
"type": ["object"],
"sync": "88C3865F-05A6-4E5C-8867-0FAC9AE264FC",
"tags": ["foo","bar"],
"self": "http://example.com/42.jump",
"edit": "http://example.com/edit.cgi/42"
},
{
"title": "Example 2",
"text": "Text and link.",
"link": "http://example.com/my2.html",
"media": "http://example.com/my2.jpg",
"id": ["8B6373C7-DA75-4120-A9BE-30C4CDA3CB73"],
"type": ["object"],
"sync": "BC4DEFA3-BF50-428B-8606-B3230953642A",
"tags": ["foo","bar"],
"edit": "http://example.com/edit.cgi/43"
}
]
4.1. Annotated Arrays
Much like JUMP records with complex values, JUMP arrays can be
annotated by using an extra level of indirection.
Sayre Expires April 13, 2007 [Page 8]
Internet-Draft JUMP October 2006
{
"type": ["array", "quux-extendo"],
"title": "Example Annotated Array",
"text": "This is html by default.",
"quux-x": "some special extensions property",
"value": [
{
"title": "Example",
"text": "Text and link.",
"link": "http://example.com/my.html",
"media": "http://example.com/my.jpg",
"id": ["B1549145-55CB-4A6B-9526-70D370821BB5"],
"type": ["object"],
"sync": "88C3865F-05A6-4E5C-8867-0FAC9AE264FC",
"tags": ["foo","bar"],
"edit": "http://example.com/edit.cgi/42"
},
{
"title": "Example 2",
"text": "Text and link.",
"link": "http://example.com/my2.html",
"media": "http://example.com/my2.jpg",
"id": ["8B6373C7-DA75-4120-A9BE-30C4CDA3CB73"],
"type": ["object"],
"sync": "BC4DEFA3-BF50-428B-8606-B3230953642A",
"tags": ["foo","bar"],
"edit": "http://example.com/edit.cgi/43"
}
]
}
4.2. Nesting
JUMP records and arrays can be nested. In the following example, an
annotated array contains 3 elements, the second of which is an array
itself.
{
"type": ["array", "quux-extendo"],
"title": "Example Annotated Array",
"text": "This is html by default.",
"quux-x": "some special extensions property",
"value": [
{
"title": "Example",
"text": "Text and link.",
"link": "http://example.com/my.html",
"media": "http://example.com/my.jpg",
"id": ["B1549145-55CB-4A6B-9526-70D370821BB5"],
Sayre Expires April 13, 2007 [Page 9]
Internet-Draft JUMP October 2006
"type": ["object"],
"sync": "88C3865F-05A6-4E5C-8867-0FAC9AE264FC",
"tags": ["foo","bar"],
"edit": "http://example.com/edit.cgi/42"
},
{
"title": "Example 2",
"text": "Text and link.",
"link": "http://example.com/my2.html",
"media": "http://example.com/my2.jpg",
"id": ["77FAFBB4-2BA4-4D8D-9920-CC6D610D71DA"],
"type": ["array"],
"sync": "66B38253-BF67-471F-85B8-3DA601986DB6",
"tags": ["foo","bar"],
"edit": "http://example.com/edit.cgi/43",
"value": [
{
"title": "Example 2a",
"text": "Example 2a text.",
"id": "59F3938E-430E-4E72-88FC-432D4D248076",
"link": "http://example.com/my2.html#sectionA",
"media": "http://example.com/my2a.jpg"
},
{
"title": "Example 2b",
"text": "Example 2b text.",
"id": "4065FDC9-05E8-42CD-A626-FC4CA27AF933",
"link": "http://example.com/my2.html#sectionB"
}
]
},
{
"title": "Example 3",
"text": "Text and link.",
"link": "http://example.com/my3.html",
"media": "http://example.com/my3.jpg",
"id": ["8B6373C7-DA75-4120-A9BE-30C4CDA3CB73"],
"type": ["object"],
"sync": "BC4DEFA3-BF50-428B-8606-B3230953642A",
"tags": ["foo","bar"],
"edit": "http://example.com/edit.cgi/43"
}
]
}
Sayre Expires April 13, 2007 [Page 10]
Internet-Draft JUMP October 2006
5. Editing
JUMP records are edited using HTTP methods, like all HTTP resources.
5.1. Editing Single Records
@tbd.
5.2. Editing Arrays
@tbd.
Sayre Expires April 13, 2007 [Page 11]
Internet-Draft JUMP October 2006
6. Security Considerations
None.
Sayre Expires April 13, 2007 [Page 12]
Internet-Draft JUMP October 2006
7. IANA Considerations
JUMP records can be identified with one of two media types,
'application/jump' and 'application/jumparray'.
7.1. application/jump
MIME media type name: application
MIME subtype name: jump
Mandatory parameters: None.
Optional parameters:
"types": This parameter contains some or all of the type
information from the internal JUMP records.
Encoding considerations: Identical to those of "application/json" as
described in RFC4627 [RFC4627], Section 6.
Security considerations: As defined in this specification.
Interoperability considerations: n/a.
Published specification: This specification.
Applications that use this media type: No known applications
currently use this media type.
Additional information:
Magic number(s): n/a
File extension: .jump
Macintosh File Type code: TEXT
Person and email address to contact for further information: Robert
Sayre
Intended usage: COMMON
Author/Change controller: Robert Sayre
Sayre Expires April 13, 2007 [Page 13]
Internet-Draft JUMP October 2006
7.2. application/jumparray
MIME media type name: application
MIME subtype name: jumparray
Mandatory parameters: None.
Optional parameters:
"types": This parameter contains some or all of the type
information from the internal JUMP records.
Encoding considerations: Identical to those of "application/json" as
described in RFC4627 [RFC4627], Section 6.
Security considerations: As defined in this specification.
Interoperability considerations: n/a.
Published specification: This specification.
Applications that use this media type: No known applications
currently use this media type.
Additional information:
Magic number(s): n/a
File extension: .jumpa
Macintosh File Type code: TEXT
Person and email address to contact for further information: Robert
Sayre
Intended usage: COMMON
Author/Change controller: Robert Sayre
Sayre Expires April 13, 2007 [Page 14]
Internet-Draft JUMP October 2006
8. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, January 2005.
[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource
Identifiers (IRIs)", RFC 3987, January 2005.
[RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom
Syndication Format", RFC 4287, December 2005.
[RFC4627] Crockford, D., "The application/json Media Type for
JavaScript Object Notation (JSON)", RFC 4627, July 2006.
Sayre Expires April 13, 2007 [Page 15]
Internet-Draft JUMP October 2006
Author's Address
Robert Sayre
Mozilla Corporation
Sayre Expires April 13, 2007 [Page 16]
Internet-Draft JUMP October 2006
Full Copyright Statement
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Acknowledgment
Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).
Sayre Expires April 13, 2007 [Page 17]