Re: Proposal: Add JSON support

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Mike Rylander <mrylander(at)gmail(dot)com>
Cc: Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: Add JSON support
Date: 2010-04-03 15:20:45
Message-ID: 4BB75CCD.1040906@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mike Rylander wrote:
>>
>> Here's my idea: the datatype should only allow strict JSON, but there
>> should be a function that accepts a liberal format, cleans it up to
>> make it strict JSON, and converts it to JSON. I think making strict
>> JSON the default makes the most sense because:
>> * Inputs to the database will most likely be coming from programs, not humans.
>> * Output is expected to be valid JSON and work anywhere JSON should work.
>> * Strict JSON is what more people would expect, I'd think.
>>
>
> +1
>
>

Yeah. That's the only thing that makes sense to me. We don't allow badly
formed XML, for example, although we do allow document fragments (as
required by the standard, IIRC). But we could sensibly have some
function like 'cleanup_json(almost_json text) returns json'.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-04-03 15:48:32 pgindent cleanup
Previous Message Tom Lane 2010-04-03 15:13:30 Re: message clarifications