summaryrefslogtreecommitdiff
path: root/lua_json.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Create "cjson" Lua module, support UCS-2 escapesMark Pulford2011-05-011-726/+0
| | | | | | | | | | - Convert lua_json_init() into luaopen_cjson() to support dynamic .so loading. - Rename "json" to "cjson" to reduce conflicts with other JSON modules. - Remove unnecessary *_pcall_* API. Lua calls are fast enough, even through C. - Encode empty tables as objects - Add support for decoding all UCS-2 escape codes.
* Update lua_json pcall API naming conventionMark Pulford2011-04-261-5/+8
|
* Move verify_arg_count() into lua_json.cMark Pulford2011-04-261-4/+9
|
* Grow decode stack, prealloc strings during encodeMark Pulford2011-04-251-13/+21
| | | | | | - Check stack usage during decode to prevent crashing in excessively nested data structures. - Preallocate the required memory for json_append_string().
* Move global table init into lua_jsonMark Pulford2011-04-251-2/+9
|
* Tidy Lua arg count verificationMark Pulford2011-04-251-3/+3
|
* Add support for growing strbufs exponentiallyMark Pulford2011-04-251-4/+2
| | | | | - Change default to 1024 byte strings and doubling in size - Add strbuf debug statistics
* Initialise lua_json lookup tables once (globally)Mark Pulford2011-04-161-3/+1
|
* Improve exception handling in lua_jsonMark Pulford2011-04-161-21/+60
| | | | | - Add json_encode_exception() - Update to throw exceptions during encoding
* Merge lua_json_encode/decode.c into lua_json.cMark Pulford2011-04-151-0/+668