Commit graph

41 commits

Author SHA1 Message Date
alisdair sullivan
3bb65e9bab Merge branch 'develop' into vtwopointoh 2013-12-17 02:03:21 +00:00
Michael Truog
30b136ce72 Fix dialyzer errors. 2013-11-22 19:22:01 -08:00
alisdair sullivan
486fda2a74 refactor test suite for additional completeness and clarity 2013-10-20 21:06:51 +00:00
alisdair sullivan
f340e8dc22 refactor options to complete mission: more pragmatism 2013-10-20 03:28:22 +00:00
alisdair sullivan
f137ff484b fix bad utf8 encodings by default (convert to u+FFFD)
this (temporarily, i hope) removes the fast path for handling
strings internally without escaping or replacing bad utf8
2013-10-20 03:16:56 +00:00
alisdair sullivan
e4a401a3a6 incomplete input now results in an error when parsing json or jsx
internal form

streaming decoding is now only available when forced with the
`stream` option and no longer returns until forced to via the
token `end_stream`. this api is still subject to being replaced
with an even more explicit streaming mode
2013-10-20 03:10:18 +00:00
alisdair sullivan
6797bf3ed7 rename explicit_end to stream in prep for behavior change 2013-10-20 03:10:09 +00:00
alisdair sullivan
d77f23ec9a merge jsx_strings and jsx_parser 2013-10-20 03:08:40 +00:00
alisdair sullivan
2d385c3342 delegate almost all responsibility of encoder to parser to simplify
internals
2013-10-20 03:07:42 +00:00
alisdair sullivan
73b9032c99 remove superfluous parser states 2013-10-19 19:35:02 -07:00
Ola Backstrom
2943116c08 Added typespecs on all exported functions
Made sure all exported types do have a typespec is useful in build scenarios
where the erlang compile options
[warnings_as_errors, warn_missing_spec]
are used.

A few type errors found by Dialyzer are corrected too.

	modified:   src/jsx.erl
	modified:   src/jsx_config.erl
	modified:   src/jsx_config.hrl
	modified:   src/jsx_decoder.erl
	modified:   src/jsx_parser.erl
	modified:   src/jsx_to_json.erl
	modified:   src/jsx_to_term.erl
	modified:   src/jsx_verify.erl
2013-09-19 17:04:38 +02:00
alisdair sullivan
15e7ec7130 add `{raw, <<"...">>}' handling to parser
this is an experimental feature to support the elixir wrapper for
jsx. interface may still change
2013-04-10 21:57:21 -07:00
alisdair sullivan
0441224998 update license dates 2013-03-10 20:30:24 -07:00
alisdair sullivan
89d3cbbd36 rename jsx_utils jsx_config 2013-03-06 01:37:08 -08:00
alisdair sullivan
c4405e45a8 move clean_string to an include file and inline it in parser and encoder, move tests to jsx_test.hrl 2013-03-06 01:28:39 -08:00
alisdair sullivan
dd302eb7b4 extend resume api to parser 2013-03-05 21:10:33 -08:00
alisdair sullivan
a5bf353b21 test incremental parsing for jsx_parser and fix bug with naked values 2013-03-05 17:33:48 -08:00
alisdair sullivan
267977bf6e replace <<16#ffff/utf8>> with <<239, 191, 191>> to allow certain tests to run on R14x 2013-03-05 16:36:49 -08:00
alisdair sullivan
df04f091f7 change returned config from record to list in error and incomplete handler 2013-03-04 23:48:34 -08:00
alisdair sullivan
2d7b690a91 add incomplete_handler and tests 2013-03-04 23:13:23 -08:00
alisdair sullivan
ca89432e7a extend error_handler to parser 2013-03-04 22:13:52 -08:00
alisdair sullivan
3a383b6cb0 revert parser to former version 2013-02-24 02:46:11 -08:00
alisdair sullivan
ef566d8cd3 remove cases from clean_string 2013-02-24 02:42:29 -08:00
alisdair sullivan
ceb7ce6586 shiny and new string cleaning for encoder and parser 2013-02-19 22:51:54 -08:00
alisdair sullivan
9e01e3a704 reduce test cases to saner set 2013-02-13 19:13:50 -08:00
alisdair sullivan
ff6a83598b replace all incidences of opts with config 2013-02-12 11:54:42 -08:00
alisdair sullivan
2f47fdd642 simplify exportation of tests, add strings to test suite 2013-02-11 19:06:44 -08:00
alisdair sullivan
eaf19cde9c extend tests to decoder, encoder and parser 2013-02-11 18:22:45 -08:00
alisdair sullivan
50133ffefd remove various tests from encoder and parser 2013-02-05 21:07:38 -08:00
alisdair sullivan
1bf196b9e3 move all encoder escape tests to jsx_utils 2013-02-05 16:52:28 -08:00
alisdair sullivan
c99cbd9d12 move all tests relating to cleaning of binary strings to jsx_utils 2013-02-05 16:40:15 -08:00
alisdair sullivan
b711bc9ef9 factor out clean_string to jsx_utils 2013-02-05 00:03:58 -08:00
alisdair sullivan
6ff94d8e5f strip trailing whitespace 2012-11-21 23:04:14 -08:00
alisdair sullivan
d081bd2539 change all stray badjson to badarg 2012-05-24 23:07:03 -07:00
alisdair sullivan
f0950dc4c9 typo in parser tests 2012-05-24 22:34:30 -07:00
alisdair sullivan
c15623a767 remove unused variables 2012-05-23 22:30:02 -07:00
alisdair sullivan
608f2437cf change behaviour of dirty_strings option, dont attempt to escape or ensure clean at all 2012-05-23 01:07:54 -07:00
alisdair sullivan
9d34818d52 remove unused explicit_end check 2012-05-23 01:00:37 -07:00
alisdair sullivan
cb39d33eda add incomplete test to jsx_parser 2012-05-23 00:57:13 -07:00
alisdair sullivan
44446357d0 add tests to jsx_parser, add it to app manifest 2012-05-23 00:52:53 -07:00
alisdair sullivan
f44ee7aeab add jsx_parser, a pda to be used in conjunction with custom tokenizers 2012-05-22 23:37:37 -07:00