Commit graph

711 commits

Author SHA1 Message Date
alisdair sullivan
989609b250 add a return_maps option that returns maps instead of proplists 2014-11-24 19:14:30 -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
4d549dd8a9 v2.1.1 2014-08-27 05:45:12 -07:00
alisdair sullivan
e2ef23a46a introduce option to skip checking for repeated keys 2014-08-26 22:28:44 -07:00
alisdair sullivan
5d184327e4 fix test that was failing for the wrong reason 2014-08-26 19:27:09 -07:00
alisdair sullivan
713810de97 use iolists in place of binaries when building json 2014-08-26 18:26:23 -07:00
alisdair sullivan
53f51c26ed v2.1 2014-08-19 17:53:22 -07: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
6b43609730 allow a single trailing comma in objects or arrays 2014-08-19 17:47:44 -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
alisdair sullivan
4ad9c38cb9 prevent json objects with repeated keys from being emitted from the
parser
2014-06-15 22:12:07 +00:00
Jihyun Yu
80d883e1d4 Fix dialyzer with maps_support 2014-06-07 15:05:04 +09:00
alisdair sullivan
8845c9acbe bump to v2.0.4 2014-06-03 21:43:43 +00:00
alisdair sullivan
fc28c7cb5f further tweak typespecs 2014-05-20 16:30:21 +00:00
alisdair sullivan
ee989ad534 bump to 2.0.3 2014-05-18 07:16:44 +00:00
alisdair sullivan
2d54e05e74 add incomplete typespecs to is_json and is_term 2014-05-17 20:14:45 +00:00
alisdair sullivan
29d07b242d bump to 2.0.2 and publish to hex.pm 2014-05-06 19:05:06 +00:00
alisdair sullivan
507fa4c41d v2.0.1 2014-04-27 22:48:48 +00:00
alisdair sullivan
698a733ec1 fix formatting of empty lists/objects when converted to json 2014-04-27 22:47:09 +00:00
alisdair sullivan
8e150dafb9 v2.0 2014-04-22 02:00:29 +00:00
alisdair sullivan
649329c362 minor refactoring of feature detection 2014-04-21 23:44:41 +00:00
alisdair sullivan
a46118ecb3 refactor out copy/pasted encode methods 2014-04-18 23:43:40 +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
1049d69f3e remove dead code
(thanks to dialyzer for the assist)
2014-02-10 04:06:13 +00:00
alisdair sullivan
a571665cb9 fix unused variable warning during compilation 2014-01-14 01:02:30 +00:00
alisdair sullivan
ff3915abbc Merge branch 'vtwopointoh' into develop 2014-01-14 00:42:12 +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
00469ba9c6 change `get_key/1' functions to return bare value or throw error
add `start_term' and `start_json' functions
2014-01-12 20:36:19 +00:00
alisdair sullivan
d011411c23 v1.4.5 2013-12-18 02:32:21 +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
alisdair sullivan
bad524fc70 Merge pull request #44 from flussonic/develop
handle  jsx:encode([{key,value}])
2013-12-12 11:21:20 -08:00
eskuat
71646247f9 Use of list_to_binary/integer_to_list for compat with earlier Erlang versions 2013-12-08 02:36:01 +07:00
eskuat
123965166a Allow integer object keys when converting term to json
i.e. automatic conversion from integer to binary.
2013-12-08 00:18:29 +07:00
Max Lapshin
216b97df55 handle jsx:encode([{key,value}]) 2013-11-28 00:20:59 +04: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
5fcd4644bf make sure `jsx_encoder:encode/2' dispatches recursive calls correctly 2013-11-13 02:29:44 +00:00
alisdair sullivan
70aebfc6ad add get_key/1' to jsx_to_json' and `jsx_to_term' 2013-10-31 02:47:45 +00:00
alisdair sullivan
08673b144e update comments about internal rep to match reality 2013-10-30 00:57:50 +00:00
alisdair sullivan
eb7527e9a3 whitespace 2013-10-30 00:52:44 +00:00
alisdair sullivan
3f7f0f1f9c introduce Config' object to internal rep in jsx_to_json' to match
`jsx_to_term'
2013-10-30 00:52:24 +00:00
alisdair sullivan
5753baefaf convert jsx_to_json over to new internal interface 2013-10-30 00:34:45 +00:00
alisdair sullivan
f58ac5566e add whitespace formatting to rep manipulation functions 2013-10-30 00:21:17 +00:00
alisdair sullivan
4d7c1c5c18 Merge remote-tracking branch 'origin/develop' into develop 2013-10-29 19:49:46 +00:00
alisdair sullivan
6b189d35d3 update to 1.4.4 2013-10-29 19:47:55 +00:00
alisdair sullivan
3fe01062e7 Merge branch 'multibytebugfix' into develop 2013-10-29 19:45:12 +00:00