summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
AgeCommit message (Collapse)Author
2012-02-23Correctly handle NULLs in JSON output.Andrew Dunstan
Error reported by David Wheeler.
2012-02-21Fix typo, noticed by Will Crawford.Andrew Dunstan
2012-02-20Fix a couple of cases of JSON output.Andrew Dunstan
First, as noted by Itagaki Takahiro, a datum of type JSON doesn't need to be escaped. Second, ensure that numeric output not in the form of a legal JSON number is quoted and escaped.
2012-02-03Add array_to_json and row_to_json functions.Andrew Dunstan
Also move the escape_json function from explain.c to json.c where it seems to belong. Andrew Dunstan, Reviewd by Abhijit Menon-Sen.
2012-01-31Built-in JSON data type.Robert Haas
Like the XML data type, we simply store JSON data as text, after checking that it is valid. More complex operations such as canonicalization and comparison may come later, but this is enough for not. There are a few open issues here, such as whether we should attempt to detect UTF-8 surrogate pairs represented as \uXXXX\uYYYY, but this gets the basic framework in place.