Commit graph

193 commits

Author SHA1 Message Date
Tristan Sloughter
fab436e1d5
drop support for versions before OTP-17 and bump to 3.0.0 2020-06-26 08:09:57 -06:00
Philip Cristiano
cc4d7121b3 Add with_tail to decode spec
`with_tail` was not defined in the spec and would fail usage of anyone
using this return format
2020-04-29 18:07:13 -04:00
Benedikt Reinartz
6d71eeccf4
Make the map term more specific 2020-03-08 13:14:17 +01:00
Guilherme Andrade
5e0df7b77d Match jsx:json_term() / jsx_to_term:json_value() specs for empty object. 2015-10-13 14:30:34 +01:00
alisdair sullivan
9d4534edc5 Revert "Revert "Master""
This reverts commit 400d046746.
2015-08-04 11:26:00 -07:00
alisdair sullivan
400d046746 Revert "Master" 2015-08-04 10:18:06 -07:00
Led
fef001479f fix build docs 2015-08-03 00:49:52 +03:00
alisdair sullivan
72c92bae0d add experimental consult/1,2 function that consults a file
containing zero or more json terms and returns them in a list
2015-01-25 21:44:15 -08:00
alisdair sullivan
6b333396a3 add maps_support/0 function that reports whether jsx was
compiled with maps support or not
2014-10-28 04:46:10 +00:00
alisdair sullivan
78f48db162 parser (and encoder) accept calendar:datetime() tuples and
convert into iso8601 strings
2014-08-19 17:50:07 -07:00
alisdair sullivan
c25bb49902 use end_json to end streaming when in streaming mode in addition
to `end_stream`
2014-08-13 23:00:35 -07:00
Jihyun Yu
80d883e1d4 Fix dialyzer with maps_support 2014-06-07 15:05:04 +09:00
alisdair sullivan
fc28c7cb5f further tweak typespecs 2014-05-20 16:30:21 +00:00
alisdair sullivan
2d54e05e74 add incomplete typespecs to is_json and is_term 2014-05-17 20:14:45 +00:00
alisdair sullivan
5868430718 tighten `json_term' type
fixes #50
2014-02-10 20:34:20 +00:00
alisdair sullivan
e1599574ff properly export config type 2014-02-10 06:39:15 +00:00
alisdair sullivan
52f5824de4 strip out public api for term/json building functions. not mature yet 2014-01-14 00:33:31 +00:00
alisdair sullivan
c81e2108dd add `get_value/1' function for retrieving the current (final?) value
of the internal representations from `jsx_to_json' and `jsx_to_term'

add all internal representation functions to `jsx' module and export
them
2014-01-12 21:38:02 +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
alisdair sullivan
3bb65e9bab Merge branch 'develop' into vtwopointoh 2013-12-17 02:03:21 +00:00
alisdair sullivan
123f8208d0 add atom to values allowed in to be encoded terms 2013-12-12 11:31:38 -08:00
Michael Truog
e31e9c4daa Fix include file issue, when using eunit. 2013-11-25 09:30:04 -08: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
3d1096f8f5 remove deprecated functions 2013-10-19 19:35:02 -07:00
alisdair sullivan
06bb658e35 formatting fixes
cleanup line spacing
2013-09-20 22:02:14 -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
Joseph Crowe
b623efe2e8 Fix type json_term/0 to match reality. 2013-09-02 08:54:10 +01: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
dd302eb7b4 extend resume api to parser 2013-03-05 21:10:33 -08:00
alisdair sullivan
07836d5d58 update types of jsx exported functions 2013-03-05 20:02:52 -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
ba42f75780 first tentative steps towards more comprehensive and flexible test suite 2013-02-06 22:28:26 -08:00
alisdair sullivan
bd3a64f457 remove integration tests from jsx module 2013-02-05 00:07:15 -08:00
alisdair sullivan
21011964da add {incomplete, ...} to return types of core jsx functions
`encode`, `decode`, `format`, `prettify` and `minify` were incompletely specified

closes #27
2013-01-22 12:41:56 -08:00
alisdair sullivan
fe67eb5b26 Update src/jsx.erl
minor formatting changes
2012-12-22 11:01:34 -08:00
alisdair sullivan
844ee2407f previously, unambiguously incomplete input was sometimes treated as ambiguous. the 'incomplete_input' flag is no longer needed to parse this input correctly 2012-11-21 23:35:15 -08:00
Devin Torres
d588361304 Export JSON types so libraries wrapping JSX can use them in their typespecs 2012-11-06 08:30:00 -06:00
alisdair sullivan
d081bd2539 change all stray badjson to badarg 2012-05-24 23:07:03 -07:00
alisdair sullivan
2aa8cd2894 README updated for v1.3, to_term and to_json replaced by decode and encode respectively 2012-05-23 22:01:07 -07:00
alisdair sullivan
57f067aaef better types and specs 2012-05-23 06:47:58 -07:00
alisdair sullivan
66304b9f5d fix types and specs in jsx.erl 2012-05-22 21:51:23 -07:00
alisdair sullivan
e18322779e add prettify/1 and minify/1 2012-05-14 23:20:17 -07:00
alisdair sullivan
3bc2c68ea3 fix the tenses and forms of option flags 2012-03-31 21:58:18 -07:00
alisdair sullivan
fdea98ebbf add escape equiv test 2012-03-31 21:19:37 -07:00
alisdair sullivan
bd6202e618 v1.1 2012-03-27 16:49:25 -07:00
alisdair sullivan
3d836f1241 remove debug statement from tests 2012-03-26 22:10:09 -07:00
alisdair sullivan
b57750fcfc fix specs for to_term/x, thanks to michael truog 2012-03-25 13:18:26 -07:00