Re: JSON NULLs - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: JSON NULLs
Date
Msg-id 5112B0C7.2030300@dunslane.net
Whole thread Raw
In response to Re: JSON NULLs  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: JSON NULLs  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 02/06/2013 02:24 PM, Merlin Moncure wrote:
> On Wed, Feb 6, 2013 at 1:08 PM, David E. Wheeler <david@justatheory.com> wrote:
>> Hackers,
>>
>> While playing with Andrew’s JSON enhancements, I noticed this:
>>
>>      david=# select * From json_each_as_text('{"baz": null}'::json);
>>       key | value
>>      -----+-------
>>       baz | null
>>
>> It is returning 'null'::text there, not NULL::text. I had expected the latter, because otherwise it's not possible
totell the difference between '{"foo": null}' and '{"foo": "null"}'. 
> IMO, this is bug in proposed implementation.  json unquoted null
> should not map to string 'null' but to SQL,  casting behavior from
> text as implemented looks correct. (only SQL null should produce json
> null)
>


Probably. I'm on it.

cheers

andrew




pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: JSON NULLs
Next
From: Merlin Moncure
Date:
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC