Re: Basic JSON support

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Re: Basic JSON support
Дата
Msg-id AANLkTimg7qEzVLjjREQuEewpiwWhbCAf8oBVemmWSTfr@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Basic JSON support  (Joseph Adams <joeyadams3.14159@gmail.com>)
Ответы Re: Basic JSON support  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, Sep 20, 2010 at 1:38 PM, Joseph Adams
<joeyadams3.14159@gmail.com> wrote:
> I have written a patch that amends the basic_json-20100915.patch .

Thanks. I merged your patch and added json_to_array(), as a demonstration
of json_stringify(). As the current code, json_stringify(json) just returns
the input text as-is, but json_stringify(json, NULL) trims all of unnecessary
whitespaces. We could do it in json_in() and json_parse() and always store
values in compressed representation instead. We leave room for discussion.

I also merge json_test_strings.sql into the main test file.
I slimed some tests -- many test cases seem to be duplicated for me.

> I went ahead and added json_validate() now because it's useful for
> testing (my test strings use it).

Good idea, but how about calling it json_is_well_formed()? We have
similar name of functions for xml type. I renamed it in the patch.


> Here's one thing I'm worried about: the bison/flex code in your patch
> looks rather similar to the code in
> http://www.jsonlint.com/bin/jsonval.tgz , which is licensed under the
> GPL.  In particular, the incorrect number regex I discussed above can
> also be found in jsonval verbatim.  However, because there are a lot
> of differences in both the bison and flex code now,  I'm not sure
> they're close enough to be "copied", but I am not a lawyer.  It might
> be a good idea to contact Ben Spencer and ask him for permission to
> license our modified version of the code under PostgreSQL's more
> relaxed license, just to be on the safe side.

Sorry for my insincere manner. Surely I read his code.
Do you know his contact address? I cannot find it...

--
Itagaki Takahiro

Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: .gitignore files, take two
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Basic JSON support