Re: JSON output functions.

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: JSON output functions.
Дата
Msg-id 4F2EDEE4.1050206@dunslane.net
обсуждение исходный текст
Ответ на Re: JSON output functions.  (Stefan Keller <sfkeller@gmail.com>)
Список pgsql-hackers

On 02/05/2012 02:31 PM, Stefan Keller wrote:
> Hi Andrew
>
> Nice work!
>
> Just for completeness: Did you also think of including geometry types
> in JSON output functions in later releases? There's a nice extension
> of JSON called GeoJSON for a starting point.


[side note: please don't top-reply on -hackers. See 
<http://idallen.com/topposting.html>]

Currently, in array_to_json and row_to_json the only special cases are:
 * record types are output as JSON records * array types are output as JSON arrays * numeric types are output without
quoting* boolean types are output as unquoted true or false * NULLs are output as NULL
 


Everything else is output as its text representation, suitably quoted 
and escaped.

If you want to change how those operate, now rather than later would be 
the best time. But later we could certainly add various other 
foo_to_json functions for things like geometry types and hstores.

cheers

andrew




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: initdb and fsync
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: pgsql_fdw, FDW for PostgreSQL server