Commit graph

194 commits

Author SHA1 Message Date
alisdair sullivan
1049d69f3e remove dead code
(thanks to dialyzer for the assist)
2014-02-10 04:06:13 +00:00
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
4d7c1c5c18 Merge remote-tracking branch 'origin/develop' into develop 2013-10-29 19:49:46 +00:00
alisdair sullivan
d06b64e4bd replace incorrect boolean shortcircuits in multibyte escaping 2013-10-29 19:44:28 +00:00
alisdair sullivan
1909687aff fix format of incomplete tests in jsx_decoder 2013-10-21 06:25:45 +00:00
alisdair sullivan
f6ebd9a1c4 remove inconsistent custom error_handler' and incomplete_handler'
tests pending reimplementation
2013-10-21 06:22:49 +00:00
alisdair sullivan
96f76b6178 further refactoring of test suite 2013-10-21 05:46:53 +00:00
alisdair sullivan
4f08d5355f fix bug where escape characters were getting dropped when operating
under `dirty_strings'
2013-10-20 21:20:55 +00: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
99484ce4f2 minor refactor of jsx_decoder 2013-10-20 03:23:38 +00:00
alisdair sullivan
a83fa3598d comments allowed by default. pragmatism 1 literalists 0 2013-10-20 03:20:36 +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
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
0bbe56c700 check for incomplete valid input before checking for malformed utf8 2013-08-27 05:02:37 +00:00
alisdair sullivan
af11b97879 undo `optimized' ordering of string parsing clauses in decoder 2013-08-27 04:09:10 +00:00
alisdair sullivan
0441224998 update license dates 2013-03-10 20:30:24 -07:00
alisdair sullivan
7f7d824116 fix edge case involving dirty_strings 2013-03-10 20:26:46 -07:00
alisdair sullivan
96ca5d4d63 coding style 2013-03-10 19:58:13 -07:00
alisdair sullivan
5e54bb3458 perf enhancements in string 2013-03-10 19:54:43 -07:00
alisdair sullivan
1747f28377 whitespace 2013-03-10 19:49:46 -07:00
alisdair sullivan
1bb7c46120 simplify handling of dirty strings 2013-03-10 19:49:06 -07:00
alisdair sullivan
a34b567ae4 add test for escaped strings and dirty strings interaction 2013-03-10 19:10:23 -07:00
alisdair sullivan
8cf3a9d144 breakout initialdecimal state to improve binary matching 2013-03-10 19:02:20 -07:00
alisdair sullivan
30108f5872 inline singlequote and doublequote and move them in match order 2013-03-10 18:15:55 -07:00
alisdair sullivan
56153d76da Merge branch 'moarclean' into develop 2013-03-10 18:05:39 -07:00
alisdair sullivan
9475ac5dd9 fix binary optimization hurdles 2013-03-10 18:05:18 -07:00
alisdair sullivan
06a289c975 begin breaking out complex states to substates 2013-03-10 17:34:50 -07:00
alisdair sullivan
1190d6cf34 shuffle some string clauses for slightly better performance 2013-03-06 23:34:46 -08:00
alisdair sullivan
292c692191 fix bug that prevented escaping of quotes in dirty strings when preceeded by an even number of forward slashes 2013-03-06 23:15:19 -08:00
alisdair sullivan
d8524ffe50 add test for dirty_strings with escaped quotes 2013-03-06 02:22:16 -08:00
alisdair sullivan
89d3cbbd36 rename jsx_utils jsx_config 2013-03-06 01:37:08 -08:00
alisdair sullivan
f8c749497f updated comments in decoder 2013-03-05 19:40:57 -08:00
alisdair sullivan
4dcb929491 Merge branch 'fixed_comments' into develop 2013-03-05 19:21:10 -08:00
alisdair sullivan
1bb6822ac2 fix manual incomplete state in done 2013-03-05 19:20:57 -08:00
alisdair sullivan
1398a747de collapse and simplify comment states and move comment errors to error site 2013-03-05 19:19:16 -08:00
alisdair sullivan
d04f231a0e change incomplete from a macro to a proper function 2013-03-05 18:50:00 -08:00
alisdair sullivan
21bdf35ecb add resume/6 function to jsx_decoder and move ?incomplete over to using it, still not ready to be exposed however 2013-03-05 18:21:34 -08:00
alisdair sullivan
b0512add5d inline maybe_replace in decoder 2013-03-05 17:39:29 -08:00
alisdair sullivan
0b3b168cfc style alterations 2013-03-05 17:37:24 -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
3162891832 change error_handler function signature to /3 from /6 2013-03-04 20:53:03 -08:00
alisdair sullivan
e625c625e0 fix formatting of Configs in function heads 2013-03-04 20:05:30 -08:00
alisdair sullivan
f12b25862d remove unused macros 2013-03-04 20:05:20 -08:00
alisdair sullivan
8f2087976a fold maybe_bom and definitely_bom into start function in decoder 2013-03-04 20:05:03 -08:00
alisdair sullivan
6ec70f8a46 add error_handler option and tests 2013-03-04 17:00:34 -08:00