Commit graph

463 commits

Author SHA1 Message Date
alisdair sullivan
03381567d2 whitespace 2011-07-31 00:05:34 -07:00
alisdair sullivan
ecdd34fa37 building strings as lists of codepoints, then converting them to binaries is faster than building binaries directly, or slicing segments out of binaries in the case of utf8. by more than 25% 2011-07-30 23:52:29 -07:00
alisdair sullivan
5f3885c594 escape_forward_slash option to allow optional escaping of forward slashes during encoding. for compatibility with microsoft json date format 2011-07-29 00:18:33 -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
16c29a0070 surrogates that encode noncharacters now are replaced by a single u+fffd rather than two 2011-07-28 21:15:21 -07:00
alisdair sullivan
f699bdeedc ensure last key 'wins' in the value decoder 2011-07-28 21:12:20 -07:00
alisdair sullivan
100f707899 streamlined options 2011-07-28 19:21:19 -07:00
alisdair sullivan
bac3ece706 whitespace 2011-07-28 18:48:07 -07:00
alisdair sullivan
cd4f4a8f1c test every codepoint possible for replacement/badness 2011-07-28 18:47:58 -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
5d1e18d0ea add test for u+2028/2029 escaping 2011-07-27 02:01:09 -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
2720b2e0fb noncharacter tests 2011-07-26 19:46:31 -07:00
alisdair sullivan
c5c98482fc test for noncharacters, fixed bug discovered by test 2011-07-26 19:28:41 -07:00
alisdair sullivan
4ba8c4d57e stricter rejection of unicode non-characters 2011-07-26 13:46:24 -07:00
alisdair sullivan
6d0d2cfb8c removed wayward io:format 2011-07-26 13:34:48 -07:00
alisdair sullivan
0507dc38dc error upon encountering escaped u+0000 to prevent malicious json 2011-07-26 13:34:15 -07:00
alisdair sullivan
ed71ce7b7f string escape u+2028 and u+2029 for compatibility with jsonp 2011-07-26 13:32:38 -07:00
alisdair sullivan
9f2c353d89 add option for streaming mode for value based decoder 2011-07-26 13:32:15 -07:00
alisdair sullivan
647f021270 minor fixes take 2 2011-07-26 13:13:00 -07:00
alisdair sullivan
63b3ca5a7f minor fixes 2011-07-26 13:12:37 -07:00
alisdair sullivan
c0cb1827f2 remove mention of eep0018, add jsx_terms 2011-07-26 13:11:03 -07:00
alisdair sullivan
1cc7c738ba fixes guard in jsx_format 2011-07-26 13:10:04 -07:00
alisdair sullivan
45fe356222 deletes eep0018 module 2011-07-26 13:09:11 -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
b4eaf15dbe fixes broken tests in format and eep 2011-07-22 21:46:24 -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
668b43b7e6 smarter emitting of ints/floats 2011-07-22 21:36:13 -07:00
alisdair sullivan
5060f86921 encoder string escaping 2011-07-22 21:34:19 -07:00
alisdair sullivan
1a59448849 encoder actually uses multi_term option, encoding and escaped_unicode still useless 2011-07-22 21:18:22 -07:00
alisdair sullivan
3bf5506292 unifies options to encoder/decoder to allow abstraction over various different built in iterators 2011-07-21 06:14:48 -07:00
alisdair sullivan
c743debc6d better tests for encoder, still needs more cases tho 2011-07-20 07:14:59 -07:00
alisdair sullivan
e7025efe50 is_json inputs now line up with format inputs 2011-07-17 20:55:54 -07:00
alisdair sullivan
fd3c6af50b new encoder now handles incomplete input 2011-07-17 20:55:54 -07:00
alisdair sullivan
2cdb755d08 new test for new encoder/formatter 2011-07-17 20:55:54 -07:00
alisdair sullivan
04dfde559e format/1,2 takes a list of terms as an argument now, in addition to binary json or a jsx_iterator 2011-07-17 20:55:54 -07:00
alisdair sullivan
9cee07212f add encoder/0 to jsx.erl 2011-07-17 20:55:54 -07:00
alisdair sullivan
0de13a2685 adds jsx_encoder.erl to mods list 2011-07-17 20:55:54 -07:00
alisdair sullivan
24492e2bdf type specs update 2011-07-17 20:55:54 -07:00
alisdair sullivan
cc10a736cd some basic tests for encoder 2011-07-17 20:55:54 -07:00
alisdair sullivan
746d8e469c renames jsx_opts to jsx_decoder_opts 2011-07-17 20:55:54 -07:00
alisdair sullivan
e80d337cc0 whitespace 2011-07-06 00:29:31 -07:00
alisdair sullivan
1422e69ef4 header file for is_json options 2011-07-05 21:42:39 -07:00
alisdair sullivan
f3aa254664 reworks is_json to be more lenient, optionally more strict 2011-07-05 21:42:08 -07:00
alisdair sullivan
51076f2054 Merge branch 'master' into stricter_parsing 2011-07-04 21:11:19 -07:00
alisdair sullivan
7079a6ead7 whitespace fixes for contributed patch 2011-07-04 21:07:50 -07:00
alisdair sullivan
922e3e525e removed now meaningless strict option from format and verify modules and associated types and specs 2011-07-04 21:04:10 -07:00