| Network Working Group | R. Sayre |
| Internet Draft | Mozilla Corporation |
| <draft-sayre-jump-00.txt> | September 2006 |
| Intended status: Experimental | |
| Expires: March 2007 |
JSON Uniform Messaging Protocol (JUMP)
draft-sayre-jump-00.txt
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 in March 2007.
Copyright © The Internet Society (2006). All Rights Reserved.
JUMP uses HTTP and a lightweight layout for JSON records to edit the Web.
JSON [1] 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.
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 [2].
An example JUMP record:
{
title: "Example",
text: "Text and <a href='http://example.com/'>link</a>.",
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 <a href='http://example.com/'>link</a>."
},
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' fields are also unlikely to interoperate with an independently-developed JUMP implementation. Guidelines for extension fields are detailed in Section 3.2.
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.
Text fields are based on the Text Constructs found in RFC 4287, section 3.1 [3]. 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.
@tbd. No hard to predict. Borrow from email and Atom as needed.
Sequences of JUMP records are denoted using JSON array syntax.
[
{
title: "Example",
text: "Text and <a href='http://example.com/'>link</a>.",
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 <a href='http://example.com/'>link</a>.",
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"
}
]
Much like JUMP records with complex values, JUMP arrays can be annotated by using an extra level of indirection.
{
type: ["array", "quux-extendo"],
title: "Example Annotated Array",
text: "This is <a href='./foo'>html</a> by default.",
quux-x: "some special extensions property",
value: [
{
title: "Example",
text: "Text and <a href='http://example.com/'>link</a>.",
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 <a href='http://example.com/'>link</a>.",
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"
}
]
}
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 <a href='./foo'>html</a> by default.",
quux-x: "some special extensions property",
value: [
{
title: "Example",
text: "Text and <a href='http://example.com/'>link</a>.",
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 <a href='http://example.com/'>link</a>.",
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 <a href='http://example.com/'>link</a>.",
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"
}
]
}
JUMP records are edited using HTTP methods, like all HTTP resources.
@tbd.
@tbd.
None.
| [1] | Crockford, D., “The application/json Media Type for JavaScript Object Notation (JSON)”, RFC 4627, July 2006. |
| [2] | Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, March 1997. |
| [3] | Nottingham, M., Ed. and R. Sayre, Ed., “The Atom Syndication Format”, RFC 4287, December 2005. |
Copyright © 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.
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.
Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).