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

The information below is for an old version of the document
Document Type Active Internet-Draft (appsawg WG)
Last updated 2012-12-25 (latest revision 2012-12-10)
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 Waiting for AD Go-Ahead::Revised I-D Needed
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: Informational                        M. Nottingham, Ed.
Expires: June 14, 2013                                            Akamai
                                                       December 11, 2012

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

Abstract

   JSON Patch defines the media type "application/json-patch", a JSON
   document structure for expressing a sequence of operations to apply
   to a 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 June 14, 2013.

Copyright Notice

   Copyright (c) 2012 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 June 14, 2013                 [Page 1]
Internet-Draft                 JSON Patch                  December 2012

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  . . . . . . . . . . . . . . . . . . . . . . . . .  5
     4.4.  move . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     4.5.  copy . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     4.6.  test . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
   5.  Error Handling . . . . . . . . . . . . . . . . . . . . . . . .  7
   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  . . . . . . . . . . . . . . . 16
     A.14. ~ Escape Ordering  . . . . . . . . . . . . . . . . . . . . 16
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16

Bryan & Nottingham        Expires June 14, 2013                 [Page 2]
Internet-Draft                 JSON Patch                  December 2012

1.  Introduction

   JavaScript Object Notation (JSON) [RFC4627] is a common format for
   the exchange and storage of structured data.  HTTP PATCH [RFC5789]
Show full document text