summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
AgeCommit message (Collapse)Author
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-08-30Split tuple struct defs from htup.h to htup_details.hAlvaro Herrera
This reduces unnecessary exposure of other headers through htup.h, which is very widely included by many files. I have chosen to move the function prototypes to the new file as well, because that means htup.h no longer needs to include tupdesc.h. In itself this doesn't have much effect in indirect inclusion of tupdesc.h throughout the tree, because it's also required by execnodes.h; but it's something to explore in the future, and it seemed best to do the htup.h change now while I'm busy with it.
2012-06-30Remove inappropriate semicolons after function definitions.Tom Lane
Solaris Studio warns about this, and some compilers might think it's an outright syntax error.
2012-06-13Revisit error message details for JSON input parsing.Tom Lane
Instead of identifying error locations only by line number (which could be entirely unhelpful with long input lines), provide a fragment of the input text too, placing this info in a new CONTEXT entry. Make the error detail messages conform more closely to style guidelines, fix failure to expose some of them for translation, ensure compiler can check formats against supplied parameters.
2012-06-12Minor code review for json.c.Tom Lane
Improve commenting, conform to project style for use of ++ etc. No functional changes.
2012-06-12Mark JSON error detail messages for translation.Robert Haas
Per gripe from Tom Lane.
2012-06-10Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian
commit-fest.
2012-06-04Fix bogus handling of control characters in json_lex_string().Tom Lane
The original coding misbehaved if "char" is signed, and also made the extremely poor decision to print control characters literally when trying to complain about them. Report and patch by Shigeru Hanada. In passing, also fix core dump risk in report_parse_error() should the parse state be something other than what it expects.
2012-05-20Fix incorrect logic in JSON number lexerPeter Eisentraut
Detectable by gcc -Wlogical-op. Add two regression test cases that would previously allow incorrect values to pass.
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.