summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add detailed parse error reportingMark Pulford2011-05-011-19/+45
| | | | | | | | | | | | | | - Always report the correct index of the token error. - Use value.string to report what was found instead of just T_ERROR. - Fix inverted unicode escape error detection.
* | Move static configuration into runtime userdataMark Pulford2011-05-011-137/+230
| | | | | | | | | | | | | | Allow maximum nesting depth and sparse array ratio to be configured at runtime via the sparse_ratio() and max_depth() functions. Throw exceptions when encoding excessively nested structures.
* | Encode very sparse arrays as objectsMark Pulford2011-05-011-1/+14
| | | | | | | | | | | | | | Detect and encode very sparse arrays as objects. This prevents something like: { [1000000] = "nullfest" } ..from generating a huge array.
* | Create "cjson" Lua module, support UCS-2 escapesMark Pulford2011-05-012-99/+154
| | | | | | | | | | | | | | | | | | | | - 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-253-18/+34
| | | | | | | | | | | | - 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-253-18/+79
| | | | | | | | | | - 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-152-275/+282
| |
* | Add functions for new strbuf API and tidyMark Pulford2011-04-152-34/+86
| | | | | | | | | | | | | | | | - Support strbuf_free() when strbuf is not dynamically created. - Ensure strbuf_free_to_string() returns a null terminated string. - Tidy API function naming. - Add strbuf_append_string(), strbuf_string(). - Allocate initial buffer in strbuf_init().
* | Initial commitMark Pulford2011-04-155-0/+1402
|/ | | | | Split Lua JSON from parent project to create standalone module. Remove unnecesssary files from new repo.
* Initial empty commit.emptyMark Pulford2011-12-240-0/+0