Re: Proposal: Add JSON support

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Petr Jelinek <pjmodos(at)pjmodos(dot)net>
Cc: Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: Add JSON support
Date: 2010-04-02 15:36:26
Message-ID: 66082611-E397-4DDD-8258-0BDFA7675786@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Apr 1, 2010, at 9:34 PM, Petr Jelinek wrote:

>> I ended up reinventing the wheel and writing another JSON library:
>>
>> http://constellationmedia.com/~funsite/static/json-0.0.1.tar.bz2
>>
>> This is a first release, and it doesn't really have a name besides
>> "json". It's very similar to cJSON, except it is (sans unknown bugs)
>> more reliable, more correct, and cleaner (unless you hate gotos ;-) ).
>> It has a simple test suite. It is not prone to stack overflows, as
>> it doesn't recurse. It is strict, requires input to be UTF-8 (it
>> validates it first) and only outputs UTF-8. Other than treating
>> numbers liberally, my implementation only accepts valid JSON code (it
>> doesn't try to correct anything, even Unicode problems). It is under
>> the MIT license.
>>
>
> I did some testing on my own, it passed everything I have thrown at it so far.
> I also did tests using MSVC for both 32bit and 64bit targets and it worked fine too (except for missing stdbool.h in msvc which is no big deal).
>
> The coding style compared to cJSON (or other libs I've seen) seems closer to the style of PostgreSQL, it would however still require pgindent run and maybe some minor adjustments.

Someone approve this project for the GSoC quick, before Joseph finishes it!

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-04-02 15:40:28 Re: walreceiver is uninterruptible on win32
Previous Message Tom Lane 2010-04-02 15:26:51 Re: walreceiver is uninterruptible on win32