JSON Patch
draft-ietf-appsawg-json-patch-09

The information below is for an old version of the document
Document Type Active Internet-Draft (appsawg WG)
Last updated 2013-01-10 (latest revision 2013-01-03)
Replaces draft-pbryan-json-patch
Stream IETF
Intended RFC status Proposed Standard
Formats pdf htmlized (tools) htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Murray Kucherawy
Shepherd write-up Show (last changed 2012-12-10)
IESG IESG state Approved-announcement to be sent
Consensus Boilerplate Unknown
Telechat date
Responsible AD Barry Leiba
Send notices to appsawg-chairs@tools.ietf.org, draft-ietf-appsawg-json-patch@tools.ietf.org
Applications Area Working Group                            P. Bryan, Ed.
Internet-Draft                                            Salesforce.com
Intended status: Standards Track                      M. Nottingham, Ed.
Expires: July 8, 2013                                             Akamai
                                                         January 4, 2013

                               JSON Patch
                    draft-ietf-appsawg-json-patch-09

Abstract

   JSON Patch defines the media type "application/json-patch", a JSON
   document structure for expressing a sequence of operations to apply
   to a JavaScript Object Notation (JSON) document, suitable for use
   with the HTTP PATCH method.

Status of this Memo

   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 http://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 July 8, 2013.

Copyright Notice

   Copyright (c) 2013 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
   (http://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.

Bryan & Nottingham        Expires July 8, 2013                  [Page 1]
Internet-Draft                 JSON Patch                   January 2013

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Conventions  . . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.  Document Structure . . . . . . . . . . . . . . . . . . . . . .  3
   4.  Operations . . . . . . . . . . . . . . . . . . . . . . . . . .  4
     4.1.  add  . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
     4.2.  remove . . . . . . . . . . . . . . . . . . . . . . . . . .  5
     4.3.  replace  . . . . . . . . . . . . . . . . . . . . . . . . .  6
     4.4.  move . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     4.5.  copy . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     4.6.  test . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
   5.  Error Handling . . . . . . . . . . . . . . . . . . . . . . . .  8
   6.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  8
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . .  9
   8.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . .  9
   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 10
     9.1.  Normative References . . . . . . . . . . . . . . . . . . . 10
     9.2.  Informative References . . . . . . . . . . . . . . . . . . 10
   Appendix A.  Examples  . . . . . . . . . . . . . . . . . . . . . . 10
     A.1.  Adding an Object Member  . . . . . . . . . . . . . . . . . 10
     A.2.  Adding an Array Element  . . . . . . . . . . . . . . . . . 11
     A.3.  Removing an Object Member  . . . . . . . . . . . . . . . . 11
     A.4.  Removing an Array Element  . . . . . . . . . . . . . . . . 12
     A.5.  Replacing a Value  . . . . . . . . . . . . . . . . . . . . 12
     A.6.  Moving a Value . . . . . . . . . . . . . . . . . . . . . . 12
     A.7.  Moving an Array Element  . . . . . . . . . . . . . . . . . 13
     A.8.  Testing a Value: Success . . . . . . . . . . . . . . . . . 14
     A.9.  Testing a Value: Error . . . . . . . . . . . . . . . . . . 14
     A.10. Adding a nested Member Object  . . . . . . . . . . . . . . 14
     A.11. Ignoring Unrecognized Elements . . . . . . . . . . . . . . 15
     A.12. Adding to a Non-existant Target  . . . . . . . . . . . . . 15
     A.13. Invalid JSON Patch Document  . . . . . . . . . . . . . . . 15
     A.14. ~ Escape Ordering  . . . . . . . . . . . . . . . . . . . . 16
     A.15. Comparing Strings and Numbers  . . . . . . . . . . . . . . 16
     A.16. Adding an Array Value  . . . . . . . . . . . . . . . . . . 17
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 17

Bryan & Nottingham        Expires July 8, 2013                  [Page 2]
Internet-Draft                 JSON Patch                   January 2013
Show full document text