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: 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 submit only basic and minimal JSON datatype support at first. The most different point of my patch is that JSON parser is reimplemented with flex and bison to make maintenance easier. Note that the JSON parser accept top-level scalar values intensionally, because of requirement when we add functions to extract values from JSON array/object. For example, CREATE FUNCTION json_to_array(json) RETURNS json[] might return naked scalar values in the result array. -- Itagaki Takahiro
basic_json-20100915.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers