Re: Proposal: Add JSON support

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: Proposal: Add JSON support
Дата
Msg-id
603c8f071003281716h14f23c40y8e2a0eeb3dcb50ea@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Proposal: Add JSON support Joseph Adams <joeyadams3.14159@gmail.com>
Re: Proposal: Add JSON support Robert Haas <robertmhaas@gmail.com>
Re: Proposal: Add JSON support Andrew Dunstan <andrew@dunslane.net>
Re: Proposal: Add JSON support Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: Add JSON support Andrew Dunstan <andrew@dunslane.net>
Re: Proposal: Add JSON support Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: Add JSON support Robert Haas <robertmhaas@gmail.com>
Re: Proposal: Add JSON support Mike Rylander <mrylander@gmail.com>
Re: Proposal: Add JSON support Robert Haas <robertmhaas@gmail.com>
Re: Proposal: Add JSON support Andrew Dunstan <andrew@dunslane.net>
Re: Proposal: Add JSON support Andrew Dunstan <andrew@dunslane.net>
Re: Proposal: Add JSON support Mike Rylander <mrylander@gmail.com>
Re: Proposal: Add JSON support Hitoshi Harada <umi.tanuki@gmail.com>
Re: Proposal: Add JSON support Josh Berkus <josh@agliodbs.com>
Re: Proposal: Add JSON support Joseph Adams <joeyadams3.14159@gmail.com>
Re: Proposal: Add JSON support Peter Eisentraut <peter_e@gmx.net>
Re: Proposal: Add JSON support Robert Haas <robertmhaas@gmail.com>
Re: Proposal: Add JSON support Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: Add JSON support Robert Haas <robertmhaas@gmail.com>
Re: Proposal: Add JSON support "David E. Wheeler" <david@kineticode.com>
Re: Proposal: Add JSON support Dimitri Fontaine <dfontaine@hi-media.com>
Re: Proposal: Add JSON support Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: Add JSON support Andrew Dunstan <andrew@dunslane.net>
Re: Proposal: Add JSON support Dimitri Fontaine <dfontaine@hi-media.com>
On Sun, Mar 28, 2010 at 7:36 PM, Tom Lane  wrote:
> Andrew Dunstan  writes:
>> Here's another thought. Given that JSON is actually specified to consist
>> of a string of Unicode characters, what will we deliver to the client
>> where the client encoding is, say Latin1? Will it actually be a legal
>> JSON byte stream?
>
> No, it won't.  We will *not* be sending anything but latin1 in such a
> situation, and I really couldn't care less what the JSON spec says about
> it.  Delivering wrongly-encoded data to a client is a good recipe for
> all sorts of problems, since the client-side code is very unlikely to be
> expecting that.  A datatype doesn't get to make up its own mind whether
> to obey those rules.  Likewise, data on input had better match
> client_encoding, because it's otherwise going to fail the encoding
> checks long before a json datatype could have any say in the matter.
>
> While I've not read the spec, I wonder exactly what "consist of a string
> of Unicode characters" should actually be taken to mean.  Perhaps it
> only means that all the characters must be members of the Unicode set,
> not that the string can never be represented in any other encoding.
> There's more than one Unicode encoding anyway...

See sections 2.5 and 3 of:

http://www.ietf.org/rfc/rfc4627.txt?number=4627

...Robert

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: Proposal: Add JSON support
От: Mike Rylander
Дата:
Сообщение: Re: Proposal: Add JSON support
FAQ