unifies options to encoder/decoder to allow abstraction over various different built in iterators

This commit is contained in:
alisdair sullivan 2011-07-21 06:14:48 -07:00
parent c743debc6d
commit 3bf5506292
4 changed files with 16 additions and 11 deletions

View file

@ -47,7 +47,7 @@
parser() -> decoder([]).
-spec parser(OptsList::jsx_decoder_opts()) -> jsx_decoder().
-spec parser(OptsList::jsx_opts()) -> jsx_decoder().
parser(OptsList) -> decoder(OptsList).
@ -58,7 +58,7 @@ parser(OptsList) -> decoder(OptsList).
decoder() -> decoder([]).
-spec decoder(OptsList::jsx_decoder_opts()) -> jsx_decoder().
-spec decoder(OptsList::jsx_opts()) -> jsx_decoder().
decoder(OptsList) ->
@ -74,7 +74,12 @@ decoder(OptsList) ->
-spec encoder() -> jsx_encoder().
encoder() -> jsx_encoder:encoder().
encoder() -> encoder([]).
-spec encoder(OptsList::jsx_opts()) -> jsx_encoder().
encoder(Opts) -> jsx_encoder:encoder(Opts).
-spec json_to_term(JSON::binary()) -> eep0018().