Commit graph

1207 commits

Author SHA1 Message Date
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
9ce9dc429c Merge branch 'feature/new_api' into develop 2011-07-26 13:14:10 -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
adb2846035 update example in extras to new api 2011-07-26 13:08: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
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
9e88f38c9f Merge pull request #1 from elbrujohalcon/master
merge elbrujohalcon's rebar opts
2011-07-04 21:08:50 -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
alisdair sullivan
9eec2459f4 Merge branch 'master' into stricter_parsing 2011-07-04 20:55:25 -07:00
Alisdair Sullivan
d6dafcf47c Merge pull request #2 from pivotree/master
Switch top-level API to use erlang:error/2, to make errors reproducible from one stacktrace. Thanks to amtal.
2011-07-04 20:53:21 -07:00
alisdair sullivan
0052480652 is_json/2 and format/2 now both accept either a json text (binary) or a function that acts as a jsx iterator. specs updated to reflect 2011-07-04 19:25:09 -07:00
alisdair sullivan
e088c6fd26 fix whitespace in app.src 2011-07-04 16:34:14 -07:00
alisdair sullivan
686690ec99 removes options for unquoted keys and comments from eep0018 2011-07-04 16:33:14 -07:00
alisdair sullivan
51eb579f86 exports pow/2 from jsx_utils 2011-07-04 16:31:31 -07:00
alisdair sullivan
e20e6746a2 removes all traces of unquoted key and comment support 2011-07-03 17:42:44 -07:00
amtal
b9d10181ab switched to error/2 from error/1 in exported funcs
Passing a list of arguments in the second parameter, makes them
show up in the stack trace in place of the function arity number.

For referentially transparent functions (which foo_to_bar tend to
be) failures can then be reproduced from just the stack trace!

If using error/1, you must rely on some higher layer to add enough
info to reproduce the crash.
2011-06-23 14:41:51 -07:00
Fernando 'Brujo' Benavides
4e0063fceb Merge branch 'master' of https://github.com/talentdeficit/jsx 2011-05-11 09:53:48 -03:00
Fernando 'Brujo' Benavides
252b9b695c A convenient set of rebar options added to rebar.config 2011-05-09 15:45:20 -03:00