Re: [HACKERS] Basic JSON support

2010-10-04 Thread Joseph Adams
On Mon, Sep 20, 2010 at 12:38 AM, Joseph Adams joeyadams3.14...@gmail.com wrote: 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

Re: [HACKERS] Basic JSON support

2010-10-04 Thread Robert Haas
On Mon, Oct 4, 2010 at 2:50 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: On Mon, Sep 20, 2010 at 12:38 AM, Joseph Adams joeyadams3.14...@gmail.com wrote: Here's one thing I'm worried about: the bison/flex code in your patch looks rather similar to the code in

Re: [HACKERS] Basic JSON support

2010-10-04 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Oct 4, 2010 at 2:50 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: If he doesn't respond, or outright refuses (which I, for one, doubt will happen), my fallback plan is to rewrite the JSON validation code by drawing from my original code

Re: [HACKERS] Basic JSON support

2010-10-04 Thread Josh Berkus
All, But having said that, I wonder whether bison/flex are really the best tool for the job in the first place. From what I understand of JSON (which admittedly ain't much) a bison parser seems like overkill: it'd probably be both bloated and slow compared to a simple handwritten

Re: [HACKERS] Basic JSON support

2010-10-04 Thread Andrew Dunstan
On 10/04/2010 08:00 PM, Josh Berkus wrote: All, But having said that, I wonder whether bison/flex are really the best tool for the job in the first place. From what I understand of JSON (which admittedly ain't much) a bison parser seems like overkill: it'd probably be both bloated and slow

Re: [HACKERS] Basic JSON support

2010-10-04 Thread Joseph Adams
On Mon, Oct 4, 2010 at 7:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Yeah.  Joseph seems to be confusing copyrights with patents.  The idea of parse JSON with bison/flex is not patentable by any stretch of the imagination. What I meant is, anyone who sets out to write a JSON parser with

Re: [HACKERS] Basic JSON support

2010-10-04 Thread Pavel Stehule
2010/10/5 Tom Lane t...@sss.pgh.pa.us: Robert Haas robertmh...@gmail.com writes: On Mon, Oct 4, 2010 at 2:50 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: If he doesn't respond, or outright refuses (which I, for one, doubt will happen), my fallback plan is to rewrite the JSON validation

Re: [HACKERS] Basic JSON support

2010-09-21 Thread Itagaki Takahiro
On Mon, Sep 20, 2010 at 1:38 PM, Joseph Adams joeyadams3.14...@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

Re: [HACKERS] Basic JSON support

2010-09-21 Thread Robert Haas
On Tue, Sep 21, 2010 at 8:38 AM, Itagaki Takahiro itagaki.takah...@gmail.com wrote: Sorry for my insincere manner. Surely I read his code. Do you know his contact address? I cannot find it... It alarms me quite a bit that someone who is a committer on this project would accidentally copy code

Re: [HACKERS] Basic JSON support

2010-09-21 Thread Itagaki Takahiro
On Tue, Sep 21, 2010 at 9:54 PM, Robert Haas robertmh...@gmail.com wrote: It alarms me quite a bit that someone who is a committer on this project would accidentally copy code from another project with a different license into PostgreSQL.  How does that happen?  And how much got copied,

Re: [HACKERS] Basic JSON support

2010-09-16 Thread Robert Haas
On Wed, Sep 15, 2010 at 9:53 PM, Itagaki Takahiro itagaki.takah...@gmail.com wrote: On Thu, Sep 16, 2010 at 9:44 AM, Robert Haas robertmh...@gmail.com wrote: Did you extract this from his work, or is this completely independent?  I'm a bit disinclined to say we should just toss overboard all

Re: [HACKERS] Basic JSON support

2010-09-16 Thread Josh Berkus
I think that if we make a habit of rewriting the contributions of first-time contributors in toto, we will have fewer second-time contributors. I think it would have been a good idea to discuss this on the list before you went and did it. To be fair to Itagaki-san, he DID ask about the

Re: [HACKERS] Basic JSON support

2010-09-15 Thread David E. Wheeler
On Sep 14, 2010, at 7:32 PM, Itagaki Takahiro wrote: Here is a patch for basic JSON support. It adds only those features: * Add json data type, that is binary-compatible with text. * Syntax checking on text to JSON conversion. * json_pretty() -- print JSON tree with indentation. We have

Re: [HACKERS] Basic JSON support

2010-09-15 Thread Itagaki Takahiro
On Thu, Sep 16, 2010 at 1:45 AM, David E. Wheeler da...@kineticode.com wrote: We have JSON datatype (WIP) 01 item:  https://commitfest.postgresql.org/action/patch_view?id=351 but it seems too complex for me to apply all of the feature at once, especially JSON-Path support. So, I'd like to

Re: [HACKERS] Basic JSON support

2010-09-15 Thread Robert Haas
On Wed, Sep 15, 2010 at 7:23 PM, Itagaki Takahiro itagaki.takah...@gmail.com wrote: On Thu, Sep 16, 2010 at 1:45 AM, David E. Wheeler da...@kineticode.com wrote: We have JSON datatype (WIP) 01 item:  https://commitfest.postgresql.org/action/patch_view?id=351 but it seems too complex for me

Re: [HACKERS] Basic JSON support

2010-09-15 Thread Itagaki Takahiro
On Thu, Sep 16, 2010 at 9:44 AM, Robert Haas robertmh...@gmail.com wrote: Did you extract this from his work, or is this completely independent?  I'm a bit disinclined to say we should just toss overboard all the work that's already been done.  Why did you write a new patch? I read his patch

[HACKERS] Basic JSON support

2010-09-14 Thread Itagaki Takahiro
Here is a patch for basic JSON support. It adds only those features: * Add json data type, that is binary-compatible with text. * Syntax checking on text to JSON conversion. * json_pretty() -- print JSON tree with indentation. We have JSON datatype (WIP) 01 item: