Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON

Поиск
Список
Период
Сортировка
От Joey Adams
Тема Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Дата
Msg-id CAARyMpAjort+79p_vS=9Htm9YG5+=6p7JdQ_i-2Mm+ad6o4Dqg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON  (Joey Adams <joeyadams3.14159@gmail.com>)
Ответы Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Список pgsql-hackers
On Mon, Jul 25, 2011 at 1:05 AM, Joey Adams <joeyadams3.14159@gmail.com> wrote:
> Should we mimic IEEE floats and preserve -0 versus +0 while treating
> them as equal?  Or should we treat JSON floats like numeric and
> convert -0 to 0 on input?  Or should we do something else?  I think
> converting -0 to 0 would be a bad idea, as it would violate the
> intuitive assumption that JSON can be used to marshal double-precision
> floats.

On the other hand, JavaScript's own .toString and JSON.stringify turn
-0 into 0, so JSON can't marshal -0 around, anyway (in practice).  Now
I think turning -0 into 0 would be fine for canonicalizing numbers in
json_in.

- Joey


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joey Adams
Дата:
Сообщение: Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON
Следующее
От: Martin Pihlak
Дата:
Сообщение: Re: libpq SSL with non-blocking sockets