Re: Add jsonb_compact(...) for whitespace-free jsonb to text

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Ryan Pedela <rpedela(at)datalanche(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Sehrope Sarkuni <sehrope(at)jackdb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add jsonb_compact(...) for whitespace-free jsonb to text
Date: 2016-05-01 01:22:00
Message-ID: 57255A38.3070906@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/29/2016 06:11 PM, Merlin Moncure wrote:

> This is a simple matter of removing spaces in the occasional C string
> literal in the serialization routines and adding a json_pretty
> function.

I spent a few hours on this. See
<https://bitbucket.org/adunstan/pgdevel/commits/branch/jsonformat> for
WIP - there are three commits. No regression tests yet for the two new
functions (json_squash and json_pretty), Otherwise fairly complete.
Removing whitespace generation was pretty simple for both json and jsonb.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-05-01 06:35:16 old_snapshot_threshold's interaction with hash index
Previous Message Joshua Drake 2016-05-01 00:46:30 Re: Lets (not) break all the things. Was: [pgsql-advocacy] 9.6 -> 10.0