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