Commit graph

735 commits

Author SHA1 Message Date
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
alisdair sullivan
d06b64e4bd replace incorrect boolean shortcircuits in multibyte escaping 2013-10-29 19:44:28 +00:00
alisdair sullivan
7b9170b32d add `Config' arg to rep manipulation 2013-10-29 19:15:16 +00:00
alisdair sullivan
7296f790b2 convert all space/newlines in json formatter to emit binaries 2013-10-27 01:28:49 +00:00
alisdair sullivan
5409668cf4 abstracted internal state of `jsx_to_json'. uses same interface as
`jsx_to_term'
2013-10-26 14:45:36 +00:00
alisdair sullivan
625f912e7b generate test state from init/1' in jsx_to_term' and `jsx_to_json'
instead of doing it by hand
2013-10-25 01:39:59 +00:00
alisdair sullivan
62914f422a abstracted internal state of the `jsx_to_term' handler 2013-10-24 05:01:20 +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
7b05d0e1b7 remove deprecated option flags handling 2013-10-20 03:12:29 +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
3d1096f8f5 remove deprecated functions 2013-10-19 19:35:02 -07:00
alisdair sullivan
73b9032c99 remove superfluous parser states 2013-10-19 19:35:02 -07:00
alisdair sullivan
07d84e25d0 remove pre_encode support 2013-10-19 19:35:01 -07:00
alisdair sullivan
0238916472 remove post_decode support 2013-10-19 19:35:01 -07:00
alisdair sullivan
377b47fdfb formatting fixes
fix line spacing issues
2013-09-20 22:03:36 -07:00
alisdair sullivan
06bb658e35 formatting fixes
cleanup line spacing
2013-09-20 22:02:14 -07:00