On Sat, Sep 18, 2010 at 11:48 PM, Joseph Adams <joeyadams3.14...@gmail.com> wrote: > As for whitespace preservation, I don't think we should go out of our > way to keep it intact. Sure, preserving formatting for input and > output makes some sense because we'd have to go out of our way to > normalize it, but preserving whitespace in JSONPath tree selections > (json_get) and updates (json_set) is a lot of work (that I shouldn't > have done), and it doesn't really help anybody. Consider json_get on > a node under 5 levels of indentation.
That seems reasonable to me. I don't mind messing up the whitespace when someone pulls a value out using a jsonpath, but I don't think we should mess with it when they just ask us to store a value. Users will tend to format their JSON in a way that they find readable, and while you'd need artificial intelligence to preserve their preferred formatting in all cases, changing it to what we think is best when there's no intrinsic necessity doesn't seem helpful. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers