Re: Proposal: Add JSON support
От
Robert Haas
Тема
Re: Proposal: Add JSON support
Дата
Msg-id
p2x603c8f071004061123wca0376e0se5f5333bca461f54@mail.gmail.com
Ответ на
Re: Proposal: Add JSON support (Tom Lane)
Список
Дерево обсуждения
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 Tue, Apr 6, 2010 at 2:20 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Apr 6, 2010 at 1:31 PM, Tom Lane wrote: >>> Oh. If they're not the same, then the problem is easily dodged, but >>> then what *is* a JSON null? > >> I assume we're going to treat JSON much like XML: basically text, but >> with some validation (and perhaps canonicalization) under the hood. >> So a JSON null will be "null", just a JSON boolean true value will be >> "true". It would be pretty weird if storing "true" or "false" or "4" >> or "[3,1,4,1,5,9]" into a json column and then reading it back >> returned the input string; but at the same time storing "null" into >> the column returned a SQL NULL. > > Hmm. So the idea is that all JSON atomic values are considered to be > text strings, even when they look like something else (like bools or > numbers)? That would simplify matters I guess, but I'm not sure about > the usability. I'm not sure what the other option is. If you do SELECT col FROM table, I'm not aware that you can return differently-typed values for different rows... > In particular I'd want to have something that dequotes > the value so that I can get foo not "foo" when converting to SQL text. > (I'm assuming that quotes would be there normally, so as not to lose > the distinction between 3 and "3" in the JSON representation.) Yes, that seems like a useful support function. ...Robert
В списке pgsql-hackers по дате отправления