Commit Graph

38 Commits (881c36236acec7472873bd0721d22ffba24a7d85)

Author SHA1 Message Date
jdeseno 881c36236a Adds support for encoding null values 2017-12-03 18:05:35 -08:00
rxi e1dbe93f7c Commented-out "strict decode" tests
These tests failing isn't an indication of the library not working as
intended; omitting them for the moment
2015-09-30 21:03:27 +01:00
rxi cc9833592e Version 0.1.0 2015-09-15 22:34:55 +01:00
rxi bf3ebf6679 Added argument type-checking to json.decode() 2015-09-06 14:07:28 +01:00
rxi 89b0e905ef Changed empty table to be treated as array when encoding 2015-09-06 10:32:25 +01:00
rxi 19b61e0628 Improved error message when encoding mixed/bad key types 2015-09-05 19:56:53 +01:00
rxi 4fb28bbeee Fixed decoding of escaped '/', added test 2015-08-31 18:43:08 +01:00
rxi 45cd518b25 Fixed mistake in README 2015-08-30 21:37:10 +01:00
rxi cd8ecd34e3 Updated point in Notes section 2015-08-30 19:32:43 +01:00
rxi 9fbfcde195 Improved error messages when encoding invalid table 2015-08-30 19:17:58 +01:00
rxi a674e3ec0f Updated tests for encoding sparse/mixed key-type tables 2015-08-30 19:11:19 +01:00
rxi 70556ccea5 Added checking for sparseness and mixed key types when encoding array 2015-08-30 19:08:50 +01:00
rxi 3845cef229 Renamed 'keyword' -> 'literal' 2015-08-20 18:54:00 +01:00
rxi 83164fb45c Removed unused `chr` argument from internal parse funcs 2015-08-19 21:15:32 +01:00
rxi 2547923431 Updated README for increase in code size 2015-08-19 21:03:25 +01:00
rxi 425c8b3e88 Replaced use of string.sub() + .byte() in parse_string with just .byte()
Provides a noticeable speed improvement on both Lua5.2 and LuaJIT 2.0.2
2015-08-19 21:00:40 +01:00
rxi 6fdbd28ed9 Replaced new-line-in-string check with control-char check; tests 2015-08-19 20:00:11 +01:00
rxi 7f823abd2e Fixed parse_string() to handle "\\" correctly, added tests 2015-08-19 19:28:10 +01:00
rxi 50f4512c2c Added additional case in 'numbers' test 2015-08-15 11:58:06 +01:00
rxi 9beca8a5bd Changed encode_number() number->string conversion method
Using Lua5.3, tonumber() will represent the float `1` as "1.0" instead
of "1". Using string.format("%14g, x) `1` is converted to "1" regardless
of whether it's an int or float. All other conversions seem to be
uneffected.
2015-08-15 11:52:07 +01:00
rxi 7b8aef0090 Fixed test for Lua5.1 - can't use %s format spec with table 2015-08-15 11:02:43 +01:00
rxi 3cfffd299e Fixed codepoint_to_utf8()'s string.char usage for Lua5.3
Lua5.3 requires that string.char's arguments are integers (<=5.2 and JIT
do not)
2015-08-15 10:56:01 +01:00
rxi b51b7a53f7 Minor formatting change to parse() func 2015-08-15 10:41:39 +01:00
rxi d1ebba043c Fixed indentation in benchmark util script 2015-08-14 20:00:48 +01:00
rxi ced32bd221 README updates 2015-08-14 19:53:23 +01:00
rxi 9720bb9f10 Added warmup for JIT in benchmark scripts 2015-08-14 19:21:42 +01:00
rxi 8cb56f3d73 Changed decode benchmark script to prevent use of lpeg 2015-08-14 19:09:20 +01:00
rxi c8e460b442 Added benchmark scripts 2015-08-13 19:11:09 +01:00
rxi 31564c4195 Changed project overview text in README 2015-08-13 18:40:09 +01:00
rxi 8bd7c4f8e7 Added more parts to the "strict decode" test 2015-08-13 18:37:57 +01:00
rxi 89a5a96194 Removed support for numbers starting with "." 2015-08-13 18:33:18 +01:00
rxi 8d14272359 Fixed parse_object() to disallow non-string keys 2015-08-13 18:31:21 +01:00
rxi e150a5239c Tests 2015-08-13 18:30:44 +01:00
rxi 05ad7beaf3 Updated README for surrogate pair support and increased size 2015-08-12 19:38:01 +01:00
rxi 10811fbad7 Added support for decoing surrogate pairs 2015-08-12 19:37:03 +01:00
rxi f36b2f34b7 Removed use of loadstring() in parse_string()
Significant performance boost
2015-08-12 18:23:30 +01:00
rxi 157fa12fae Fixed parse_keyword() from making null -> false 2015-08-11 21:15:49 +01:00
rxi 8b9c820218 Initial commit 2015-08-11 21:08:33 +01:00