From 6120455a222f5e2c891822a50e3126b41c4ebc30 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Wed, 11 Aug 2010 22:33:50 -0700 Subject: [PATCH] updated modules to use the new eep0018() type --- src/jsx.erl | 4 ++-- src/jsx_eep0018.erl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jsx.erl b/src/jsx.erl index 34f110e..6e9dd7b 100644 --- a/src/jsx.erl +++ b/src/jsx.erl @@ -67,8 +67,8 @@ parser(OptsList) -> end. --spec term_to_json(JSON::json()) -> binary(). --spec term_to_json(JSON::json(), Opts::encoder_opts()) -> binary(). +-spec term_to_json(JSON::eep0018()) -> binary(). +-spec term_to_json(JSON::eep0018(), Opts::encoder_opts()) -> binary(). term_to_json(JSON) -> term_to_json(JSON, []). diff --git a/src/jsx_eep0018.erl b/src/jsx_eep0018.erl index cd9c280..b2f817c 100644 --- a/src/jsx_eep0018.erl +++ b/src/jsx_eep0018.erl @@ -34,7 +34,7 @@ --spec json_to_term(JSON::binary(), Opts::decoder_opts()) -> json(). +-spec json_to_term(JSON::binary(), Opts::decoder_opts()) -> eep0018(). json_to_term(JSON, Opts) -> P = jsx:parser(opts_to_jsx_opts(Opts)), @@ -49,7 +49,7 @@ json_to_term(JSON, Opts) -> %% erlang terms to jsx events is straightforward and the iterator can be faked with an %% anonymous function --spec term_to_json(JSON::json(), Opts::encoder_opts()) -> binary(). +-spec term_to_json(JSON::eep0018(), Opts::encoder_opts()) -> binary(). term_to_json(List, Opts) -> case proplists:get_value(strict, Opts, true) of