Commit graph

64 commits

Author SHA1 Message Date
alisdair sullivan
9842a00b4d strip out checks for repeated keys in generated json. no one cares
about repeated keys
2014-12-07 07:59:51 +00:00
alisdair sullivan
2d54e05e74 add incomplete typespecs to is_json and is_term 2014-05-17 20:14:45 +00:00
alisdair sullivan
95b2d9b628 allow atoms in erlang terms to be converted to strings in json objects
and arrays. `true`, `false` and `null` excluded
2013-12-18 02:13:50 +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
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
8eb302b45f add tests for repeated keys in jsx_verify 2013-03-04 20:34:04 -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
e6380bc3a3 break special decodeable forms out to own test data 2013-02-10 19:39:42 -08:00
alisdair sullivan
2ebffe0616 add floats to tests 2013-02-09 15:49:56 -08:00
alisdair sullivan
18f36ddb0a more test data generators 2013-02-08 10:43:52 -08:00
alisdair sullivan
d0535dfe1c tweak test representation to remove 'end_json' from tests and insert in handlers to aid composability 2013-02-07 13:30:48 -08:00
alisdair sullivan
6ca54ae3d7 pad out test tests 2013-02-07 06:44:36 -08:00
alisdair sullivan
ba42f75780 first tentative steps towards more comprehensive and flexible test suite 2013-02-06 22:28:26 -08:00
alisdair sullivan
81f0321e32 add tests for stricter parsing of opts 2013-02-05 00:07:15 -08:00
alisdair sullivan
5efec8af8e reject invalid opts flags more strictly 2013-02-04 23:08:44 -08:00
alisdair sullivan
6ff94d8e5f strip trailing whitespace 2012-11-21 23:04:14 -08:00
alisdair sullivan
d2950ab8c7 remove all ?_assert and replace with ?_assertFoo's 2012-03-21 05:36:39 -07:00
alisdair sullivan
01637106c1 more tests, up to 90% code coverage 2012-03-05 20:15:01 -08:00
alisdair sullivan
d654a0e882 lift init methods into decoder/encoder 2012-03-05 19:53:55 -08:00
alisdair sullivan
ec295a888b new is_term function that mirrors is_json for erlang terms 2012-03-04 18:40:00 -08:00
alisdair sullivan
ed33626ed5 add encoder and decoder functions to api 2012-03-04 15:47:08 -08:00
alisdair sullivan
63faf04115 factor out gen_json 2012-03-02 22:53:45 -08:00
alisdair sullivan
093baaf515 add documentation for is_json 2011-12-14 21:32:17 -08:00
alisdair sullivan
6dacf64620 refactors out extraction of parser opts, generalizes use of specific parsers by processors 2011-11-29 19:39:01 -08:00
alisdair sullivan
e89443b362 is_json implemented 2011-11-23 21:52:14 -08:00
alisdair sullivan
7e88a14525 massive simplification of api, operation and internals. removes all demo modules temporarily 2011-08-31 18:52:01 -07:00
alisdair sullivan
affdd3cc62 minor fixups to spec/api 2011-08-19 20:13:49 -07:00
alisdair sullivan
6234e4a986 moves headers back to include dir so include_lib works. except jsx_format.hrl, because jsx_format needs a full rewrite 2011-08-16 22:45:32 -07:00
alisdair sullivan
3186223fd1 better guarding of opts parsing 2011-08-10 23:18:42 -07:00
alisdair sullivan
c56cf7c00b remove jsx_verify.hrl, move opts record to main body 2011-08-10 22:57:53 -07:00
alisdair sullivan
0624321347 removes catch blocks from jsx_verify, allow errors to propogate 2011-08-10 22:48:55 -07:00
alisdair sullivan
d64644e01f whitespace 2011-08-10 22:45:00 -07:00
alisdair sullivan
a2c7cf3977 new test for repeated nested keys 2011-08-10 21:59:27 -07:00
alisdair sullivan
bb80bf2b83 is_json rewritten to use new api 2011-08-10 21:55:58 -07:00
alisdair sullivan
0c3cf2b87b encoder updated to use same api as decoder, format and verify updated to be aware of new api 2011-08-10 00:33:14 -07:00
alisdair sullivan
8bb0f66470 unless iterate option is specified, jsx now buffers events internally before returning 2011-08-09 17:49:42 -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
e7025efe50 is_json inputs now line up with format inputs 2011-07-17 20:55:54 -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
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
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
e20e6746a2 removes all traces of unquoted key and comment support 2011-07-03 17:42:44 -07:00
alisdair sullivan
e4cbe15fa7 fixes broken build from premature push, oops 2011-05-04 01:00:29 -07:00
alisdair sullivan
b2d923cbcb api change, parser/0,1 deprecated, replaced with decoder/0,1 2011-04-26 23:40:12 -07:00
alisdair sullivan
6cc28573b6 changes default for strict to false from true to better match other json encoders/decoders in the wild 2011-04-26 21:30:57 -07:00
alisdair sullivan
216a71895a removes all edoc machinery 2011-03-22 19:02:28 -07:00
alisdair sullivan
a6e7490a2b options are now proplist style, so [comments] implies [{comments, true}] et cetera 2011-03-07 14:02:51 -08:00