json api WIP patch

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2012-12-26T20:33:59Z
Lists: pgsql-hackers

Attachments

Here is a patch for the first part of the JSON API that was recently 
discussed. It includes the json  parser hook infrastructure and 
functions for json_get and friends, plus json_keys.

As is, this exposes the json lexer fully for use by the hook functions. 
But I could easily be persuaded that this should be an opaque structure 
with some constructor and getter functions - I don't think the hook 
functions need or should be able to set anything in the lexer.

Work is proceeding on some of the more advanced functionality discussed.

cheers

andrew