[apps-discuss] draft-snell-merge-patch-08 in Ruby

Steve Klabnik <steve@steveklabnik.com> Sat, 18 May 2013 19:58 UTC

Return-Path: <steve@steveklabnik.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C4BC21F8BC5 for <apps-discuss@ietfa.amsl.com>; Sat, 18 May 2013 12:58:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ATOvyRk8a3ov for <apps-discuss@ietfa.amsl.com>; Sat, 18 May 2013 12:58:10 -0700 (PDT)
Received: from mail-ia0-x229.google.com (mail-ia0-x229.google.com [IPv6:2607:f8b0:4001:c02::229]) by ietfa.amsl.com (Postfix) with ESMTP id 75F7621F8551 for <apps-discuss@ietf.org>; Sat, 18 May 2013 12:58:10 -0700 (PDT)
Received: by mail-ia0-f169.google.com with SMTP id k38so6170209iah.14 for <apps-discuss@ietf.org>; Sat, 18 May 2013 12:58:09 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=lTItvIHrvQlUZhIPmI2V0rVLMV6IeFggXcDIzOGXQB8=; b=fq8Mja2w+nkZWyUJa4rL2t9e0b+O6tiiaYnlLToGmuOA1WusvGxU1gVmKNGR7iSxY0 Mz1vteekG+UdezN0nBhalC1PIMekNXVxywU/o2hID29LzuBrOF1I3fYQ2K/u6/BjIHoF zZB5sHXTuJnZwI2Fmkb7xbC+60nefiYknDuBuubA0HBe/Cm1R81FrHMAtXtaW5DfQ3b8 z0lwuagzddbmD21rlx11IPGQN7KpFJ13ZwVl5FH1W+V+hZuzufScImhCLR/gYcOJmX9T m23M54IdrBzYQ9gYAzgTH7XaH3zcaq5ihvv9XQYuJfkXkRsuMHiSm6nuIV/WArWmilz6 NBoA==
MIME-Version: 1.0
X-Received: by 10.42.35.75 with SMTP id p11mr19658912icd.6.1368907089512; Sat, 18 May 2013 12:58:09 -0700 (PDT)
Received: by 10.64.53.170 with HTTP; Sat, 18 May 2013 12:58:09 -0700 (PDT)
Date: Sat, 18 May 2013 12:58:09 -0700
Message-ID: <CABL+ZB6AQGp8WUeH=HZrfm4VCQnmYFQB5vBGP0yghAZUhsjCQg@mail.gmail.com>
From: Steve Klabnik <steve@steveklabnik.com>
To: apps-discuss@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
X-Gm-Message-State: ALoCoQl4VhRVm2YoNMVwuFcLQa3BwLP4kfqiCzcwbty0em34S86MkExVc+/5zo2mb6iFvefiUIfR
Subject: [apps-discuss] draft-snell-merge-patch-08 in Ruby
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 18 May 2013 19:58:11 -0000

Hey there!

James suggested that I post to this list, so here I am.

I'm a committer to Ruby on Rails, and Rails 4 is near a release. One
of the changes in Rails 4 is the usage of PATCH, which means I'm
checking up on various diff media types. Mark Nottingham brought my
attention to draft-snell-merge-patch as a simpler variant of
json-patch.

Anyway, I have a _mostly_ working implementation of the latest draft
as a gem, here: https://github.com/steveklabnik/json-merge_patch .
It's only missing the "Recursively apply rule 2" portion. Hopefully
I'll be finishing it off soon.

I'd say that overall this draft was super simple to implement,
especially given Ruby's (like many scripting languages) ease of
mapping JSON directly to its rich Hash and Array types in the language
core.

I may have one or two thoughts on the language of the spec, but I need
to re-read it and take some notes this time around.

- Steve