JSON Patch (RFC 6902) support?

From: Ryan Pedela <rpedela(at)datalanche(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: JSON Patch (RFC 6902) support?
Date: 2014-03-13 16:53:41
Message-ID: CACu89FSYikxdUj+J01BoAvoyieaGsXr1wSo1oQgGBMXsBNoMhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is my first email to the PostgreSQL mailing lists so I hope this is
the correct place. If not, please let me know.

I was wondering if it would be possible and wise to support JSON Patch?
https://tools.ietf.org/html/rfc6902

One of the problems I have as a user is how to update a portion of a JSON
object efficiently. Right now I have to read the entire field from the
database, update it, and then write it back. I am thinking JSON Patch might
be a good way to solve this problem because it would allow partial updates
and I think it could easily fit into the existing set of JSON functions
such as:

// applies a JSON Patch
json_patch_apply(json, patch)

// diffs two JSON objects and produces a JSON Patch
json_patch_diff(json a, json b)

Thanks,
Ryan Pedela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-03-13 16:58:32 Re: GIN improvements part2: fast scan
Previous Message David Johnston 2014-03-13 16:16:45 Re: BUG #9555: pg_dump for tables with inheritance recreates the table with the wrong order of columns