Re: Add jsonb_compact(...) for whitespace-free jsonb to text - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Add jsonb_compact(...) for whitespace-free jsonb to text
Date
Msg-id 57255A38.3070906@dunslane.net
Whole thread Raw
In response to Re: Add jsonb_compact(...) for whitespace-free jsonb to text  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Add jsonb_compact(...) for whitespace-free jsonb to text  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
List 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





pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: New 9.6 external sort guidance around temp_tablespaces and maintenance_work_mem
Next
From: Amit Kapila
Date:
Subject: old_snapshot_threshold's interaction with hash index