Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP) - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Date
Msg-id AANLkTiky4FivajKACtXtPbHk9vbToa+SpbxwpvYVeoch@mail.gmail.com
Whole thread Raw
In response to Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)  (Joseph Adams <joeyadams3.14159@gmail.com>)
Responses Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)  (Joseph Adams <joeyadams3.14159@gmail.com>)
List pgsql-hackers
On Fri, Aug 13, 2010 at 7:33 PM, Joseph Adams
<joeyadams3.14159@gmail.com> wrote:
> Updated patch:  the JSON code has all been moved into core, so this
> patch is now for a built-in data type.

I have a question about the design of the JSON type. Why do we need to
store the value in UTF8 encoding? It's true the RFC of JSON says the
the encoding SHALL be encoded in Unicode, but I don't understand why
we should reject other encodings.

As I said before, I'd like to propose only 3 features in the commitfest: * TYPE json data type * text to json: FUNCTION
json_parse(text)* json to text: FUNCTION json_stringify(json, whitelist, space) 

JSONPath will be re-implemented on the basic functionalities in the
subsequent commitfest. Do you have a plan to split your patch?
Or, can I continue to develop my patch? If so, JSONPath needs
to be adjusted to the new infrastructure.

I think json_parse() and json_stringify() is well-known APIs for JSON:
https://developer.mozilla.org/En/Using_JSON_in_Firefox
So, it'd be worth buying the names and signatures for our APIs.
(I'll rename json_pretty in my previous patch to json_stringify.)

--
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: Report: removing the inconsistencies in our CVS->git conversion
Next
From: Simon Riggs
Date:
Subject: Re: Configuring synchronous replication