Commit graph

52 commits

Author SHA1 Message Date
alisdair sullivan
6dfaa61bfa allow interchange of nullbyte in strings 2011-12-01 06:32:56 -08:00
alisdair sullivan
0ea61233c5 strings returned as binaries 2011-10-28 06:31:40 -07:00
alisdair sullivan
200fb231a9 fresh api. virtually whole new thing, entirely new interface and heavily modified encoder/decoder 2011-10-21 18:16:16 -07:00
alisdair sullivan
776ee8a8a2 two new tests for bad low pairs of json surrogate pairs 2011-08-03 00:45:49 -07:00
alisdair sullivan
5cd967b26d discovered and fixed a couple more broken tests 2011-08-03 00:15:18 -07:00
alisdair sullivan
b3eb058463 revert change from strings/keys being presented as binaries to being presented as lists of characters. ~30% speedup 2011-07-31 19:05:30 -07:00
alisdair sullivan
20f9e0368d tests could fail silently when file:consult failed, fixed 2011-07-31 18:43:14 -07:00
alisdair sullivan
b73ca00892 alters behaviour for escaped noncharacters in extended plane with loose_unicode enabled, now replaced by single u+fffd, not two 2011-07-28 21:21:08 -07:00
alisdair sullivan
0e66a82b29 Merge branch 'feature/loose_unicode' into develop 2011-07-27 06:52:25 -07:00
alisdair sullivan
80e9381b42 proper guarding and handling of noncharacters in json strings. more tests required 2011-07-27 06:52:16 -07:00
alisdair sullivan
df04e7af89 modify fraction test to increase test coverage slightly 2011-07-27 02:01:34 -07:00
alisdair sullivan
653205501c adds loose_unicode option which replaces badly formed unicode (escaped non-characters and restricted codepoints, as well as partial surrogates) with u+fffd instead of throwing an error 2011-07-27 01:59:03 -07:00
alisdair sullivan
b153ce3685 moves escaping tests to general test lib, minor refactoring of test runner to facilitate 2011-07-26 19:58:48 -07:00
alisdair sullivan
68d78c8e25 new api: strings and keys returned as binaries, integers as integers, floats as floats, tuple format changed from {event, ..., ...} to {jsx, ..., ...}, tests updated 2011-07-26 00:35:17 -07:00
alisdair sullivan
66f5e0b48a adds {escaped_unicode, replace} option that replaces illegal escape sequences with the unicode replacement character u+fffd when encountered 2011-07-22 23:47:35 -07:00
alisdair sullivan
2ee96eb356 tests updated to reflect parser changes, eep0018 and format module still contain failing tests 2011-07-22 21:36:14 -07:00
alisdair sullivan
e20e6746a2 removes all traces of unquoted key and comment support 2011-07-03 17:42:44 -07:00
alisdair sullivan
098fcbab1e {unquoted_keys, true | false} now allows control of whether unquoted object keys are rejected or not by the parser/eep0018 decoder 2010-09-23 22:27:55 -07:00
alisdair sullivan
4c3b5559d4 housekeeping, fixed makefile 2010-08-10 13:09:09 -07:00
alisdair sullivan
1617c878f5 abandoning branch for now, work is in intermediate state 2010-08-10 11:04:14 -07:00
alisdair sullivan
5413c837d4 more tests, more bugs fixed 2010-08-03 21:15:24 -07:00
alisdair sullivan
3ea3eba7b3 first attempt at integrating json lib with jsx lib 2010-08-03 20:29:49 -07:00
alisdair sullivan
db91b3fb74 simplified api, end_json now signifies you can cease parsing, no need to continue and check tail 2010-08-02 20:42:12 -07:00
alisdair sullivan
eb49531e73 fixed failing negative zero test 2010-06-26 07:30:13 -07:00
alisdair sullivan
528bdc4791 added test case for negative zero, fixed typo in zero.test 2010-06-25 03:22:02 -07:00
alisdair sullivan
37f9d2a07a brought test suite up to date, fixed a dumb error that occured when parsing integers larger than 100 2010-06-21 23:06:55 -07:00
alisdair sullivan
cff4d17561 substantial refactoring of api and decoder internals 2010-06-20 17:00:08 -07:00
alisdair sullivan
813058e2fb changed end_of_json to end_json 2010-06-10 20:32:15 -07:00
alisdair sullivan
5460796e33 changed end of stream token 2010-06-07 16:10:29 -07:00
alisdair sullivan
ef952ceee8 converted jsx_test to etap, fixed resulting bugs with autodetection 2010-06-01 23:33:56 -07:00
alisdair sullivan
b82d4c5337 new tests 2010-06-01 21:00:12 -07:00
alisdair sullivan
7c2c0596c7 fixed swap of two variables 2010-06-01 20:57:58 -07:00
alisdair sullivan
8faa7089f8 updated tests, which are shortly to be rewritten completely 2010-06-01 19:43:21 -07:00
alisdair sullivan
c25ad16f13 possible new api 2010-05-31 21:00:20 -07:00
alisdair sullivan
60943446c0 now ethically opposed to special casing forced termination. users can just append whitespace 2010-05-31 21:00:20 -07:00
alisdair sullivan
2a2275136a Removed all records from the core decoder. Replaced with macros and a raw tuple containing options. Updated one test to account for changed api. 2010-05-31 21:00:20 -07:00
alisdair sullivan
7e6124fc88 explicit termination is no longer an option. the decoder now terminates whenever it reaches the end of an unambiguous json term and returns a function that accepts either more input to continue decoding or the empty binary to force termination.
examples are currently broken, but the test suite has been updated to reflect the new api.
2010-05-31 21:00:16 -07:00
alisdair sullivan
7d5ccfd86f removed the default callback handler, replaced it with an anonymous function. also added a shortcut for a decoder with the default handler but custom opts 2010-05-31 21:00:16 -07:00
alisdair sullivan
7e6b71cdf4 fixed tests, which i broke somehow 2010-05-31 21:00:16 -07:00
alisdair sullivan
86333b8e7f did you know the module definition must be the first non-whitespace, non-comment line in a module? i did not 2010-05-31 21:00:16 -07:00
alisdair sullivan
feaef7380c changed api of jsx_parser 2010-05-31 21:00:06 -07:00
alisdair sullivan
8e05d0c1a6 added license/copywrite to all code 2010-05-31 21:00:06 -07:00
alisdair sullivan
550f628564 updated test suite to match new decoder 2010-05-31 21:00:06 -07:00
alisdair sullivan
5d014bbef8 minor api change and refactoring of pretty_printer.erl 2010-05-31 21:00:05 -07:00
alisdair sullivan
bdc173a6e4 changed the end of input character to a unicode non character 2010-05-31 21:00:05 -07:00
alisdair sullivan
079aa7ccf6 fixed a nasty performance regression caused by a misordered clause 2010-05-31 21:00:05 -07:00
alisdair sullivan
fca157c116 almost complete coverage of decoder achieved via test cases, fixed one outstanding comments bug 2010-05-31 21:00:05 -07:00
alisdair sullivan
6515f9981d added option for explicit termination requirement when parsing streams 2010-05-31 21:00:05 -07:00
alisdair sullivan
3b3e33c6e3 fixes revealed by cover 2010-05-31 21:00:05 -07:00
alisdair sullivan
ab67abd01a rewrote test harness to use eunit and make it easier to add future tests 2010-05-31 21:00:04 -07:00