summaryrefslogtreecommitdiff
path: root/json-glib/json-scanner.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for parsing \uXXXX into UnicodeEmmanuele Bassi2008-04-191-6/+50
| | | | | | | | | | | | JsonScanner was forked from GScanner in order to support the JSON-specific Unicode escaping. JsonScanner now intercepts the \u escape character and, if it is followed by a hexadecimal value, it will retrieve the Unicode character encoded in the following 4 values and insert the character itself in the buffer. This allows full compatibility with JSON.
* Sanitize JsonScanner codeEmmanuele Bassi2008-02-291-22/+20
| | | | | | | Use a closure instead of (*eugh*) an array of gpointers and casting to void*. Also, use the Slice allocator for the ScannerKey structs.
* Completely internalize the JsonScannerEmmanuele Bassi2008-02-291-316/+323
| | | | | Rename all the API and the data types to the Json namespace, so we can use the internal copy instead of GScanner.
* Update the JsonScanner default configurationEmmanuele Bassi2008-02-291-48/+36
|
* Copy GScanner into JSON-GLib as JsonScannerEmmanuele Bassi2008-02-291-0/+1809
Instead of writing our tokenizer we can fork GScanner and make a specialized version for JSON (as per RFC), luckily the licenses are compatible (LGPLv2.1 with "any later" clause). GScanner does not support Unicode "\uNNNN" escaping and we need to ensure UTF-8 strings as well. The API will mostly be the same, but the generic bits not used by JsonParser will be hidden: this is, after all, a specialized tokenizer.