Re: mogrify and indent features for jsonb

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mogrify and indent features for jsonb
Date: 2015-03-01 10:03:11
Message-ID: 54F2E3DF.1030107@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 23/02/15 18:15, Dmitry Dolgov wrote:
> Hi, Petr, thanks for the review.
>
> >>> I think it would be better if the ident printing didn't put the
> start of array ([) and start of dictionary ({) on separate line
> Did you mean this?
>
> [
> {
> "a": 1,
> "b": 2
> }
> ]
>
> I tried to verify this in several ways (http://jsonprettyprint.com/,
> "JSON.stringify", "json.too" from python), and I always get this result
> (new line after ([) and ({) ).

No, I mean new lines before the ([) and ({) - try pretty printing
something like '{"a":["b", "c"], "d": {"e":"f"}}' using that tool you
pasted and see what your patch outputs to see what I mean.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-03-01 10:49:54 Re: Enforce creation of destination folders for source files in pg_regress (Was: pg_regress writes into source tree)
Previous Message Andrew Gierth 2015-03-01 06:55:55 Re: plpgsql versus domains