| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Improve text for clarity.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Louis-Philippe Perron (@loopole)
- Mac OSX bug report
Steve Donovan <steve.j.donovan@gmail.com>
- Window build testing
- Luarocks assistance
Zhang "agentzh" Yichun <agentzh@gmail.com>
- Whitespace suggestion
- Solaris isinf() bug
- Array detection bug
|
|
|
|
|
|
|
| |
Some versions of Solaris (Eg, Solaris 11 / GCC 3.4.3) are missing
isinf(). Provide a work around when MISSING_ISINF is defined.
Reported by: Zhang "agentzh" Yichun <agentzh@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
lua_array_length() recognised some objects with numeric string
keys as arrays since it was incorrectly using lua_isnumber().
When an object was incorrectly recognised as an array,
json_append_array() would not find any entries and generate a
result like:
[null,null,...]
Reported by: Zhang "agentzh" Yichun <agentzh@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Roughly calculate the number of iterations required to run the benchmark
for the chosen duration.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Add cjson.encode_number_precision(). Reducing the number precision from
14 to 3 can increase performance up to 50% with number heavy
conversions.
|
|
|
|
| |
Windows has poor support for "tar.gz", but all platforms support "zip".
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove Perl dependency on Text::Iconv to improve portability.
|
|
|
|
|
| |
Move benchmark() into bench.lua since it not used elsewhere.
Replace posix.gettimeofday() with socket.gettime() to improve portability.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Sprintf returns "-nan" rather than "nan" on some platforms, which causes
the test script to incorrectly flag a failure.
Also allow test functions without "==> Config" output.
|
|
|
|
|
|
| |
Remove "-lm" from LDFLAGS in Makefile since it breaks the build under
Windows and isn't required under Linux. Math lib fix suggested by:
Steve Donovan <steve.j.donovan@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Suspending GC appears to make the benchmark results more consistent.
|
|
|
|
| |
json->tmp was not freed when throwing a Lua stack overflow exception.
|
|
|
|
|
|
|
| |
Remove excess whitespace to reduce output size and increase encode
performance.
Suggested by: Zhang "agentzh" Yichun <agentzh@gmail.com>
|
|
|
|
|
|
| |
- Use pcall() to call test config functions.
- Test encoding with refuse_invalid_numbers() options.
- Test encoding invalid types.
|
|
|
|
|
| |
Change "perl -w" to "use warnings" for compatibility with systems that
put all #! args into argv[1].
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Add tests for UTF-16 decoding and failures
- Add getutf8.pl to assist with UTF-16 decode testing
- Re-add test_decode_cycle() which was accidentally removed earlier
- Rename bytestring.dat to octets-escaped.dat
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Add run_test(): Test a function and verify its output
- Add run_test_group(): Execute a test batch
- Add serialise_value(): Serialise a Lua value into the Lua syntax
- Add file_save() helper function
- Add NaN comparison support to compare_values()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Rename API for consistency:
- sparse_ratio() -> encode_sparse_array()
- max_depth() -> encode_max_depth()
- invalid_numbers() -> refuse_invalid_numbers()
- Adjust sparse array handling:
- Add "safe" option to allow small sparse arrays regardless of the
ratio.
- Generate an error by default instead of converting an array into an
object (POLA).
- Update invalid number handling:
- Allow decoding invalid numbers by default since many JSON
implementations output NaN/Infinity.
- Throw an error by default when attempting to encode NaN/Infinity
since the RFC explicitly states it is not permitted.
- Support specifying invalid number configuration separately for
encode/decode.
|