diff --git a/src/jsx.app.src b/src/jsx.app.src index d8f77e0..93cbd52 100644 --- a/src/jsx.app.src +++ b/src/jsx.app.src @@ -7,8 +7,10 @@ gen_json, jsx_encoder, jsx_decoder, - jsx_format, - jsx_utils + jsx_to_json, + jsx_to_term, + jsx_utils, + jsx_verify ]}, {registered, []}, {applications, [ diff --git a/src/jsx.erl b/src/jsx.erl index 5bcb124..63bcfbf 100644 --- a/src/jsx.erl +++ b/src/jsx.erl @@ -25,7 +25,7 @@ -export([encoder/0, encoder/1]). -export([decoder/2, decoder/3]). -%% shims for jsx_format, jsx_terms, jsx_verify +%% shims for jsx_to_json, jsx_to_term, jsx_verify -export([to_json/1, to_json/2]). -export([to_term/1, to_term/2]). -export([is_json/1, is_json/2]). @@ -83,19 +83,19 @@ encoder(OptsList) when is_list(OptsList) -> jsx_encoder:encoder(OptsList). -spec to_json(Source::binary() | list()) -> binary(). --spec to_json(Source::binary() | list(), Opts::jsx_format:opts()) -> binary(). +-spec to_json(Source::binary() | list(), Opts::jsx_to_json:opts()) -> binary(). to_json(Source) -> to_json(Source, []). -to_json(Source, Opts) -> jsx_format:to_json(Source, Opts). +to_json(Source, Opts) -> jsx_to_json:to_json(Source, Opts). -spec to_term(Source::binary() | list()) -> list(). --spec to_term(Source::binary() | list(), Opts::jsx_terms:opts()) -> list(). +-spec to_term(Source::binary() | list(), Opts::jsx_to_term:opts()) -> list(). to_term(Source) -> to_term(Source, []). -to_term(Source, Opts) -> jsx_terms:to_term(Source, Opts). +to_term(Source, Opts) -> jsx_to_term:to_term(Source, Opts). -spec is_json(Source::binary() | list()) -> true | false. diff --git a/src/jsx_format.erl b/src/jsx_to_json.erl similarity index 99% rename from src/jsx_format.erl rename to src/jsx_to_json.erl index 978af70..b76bbb5 100644 --- a/src/jsx_format.erl +++ b/src/jsx_to_json.erl @@ -21,7 +21,7 @@ %% THE SOFTWARE. --module(jsx_format). +-module(jsx_to_json). -export([to_json/2]). -export([init/1, handle_event/2]). diff --git a/src/jsx_terms.erl b/src/jsx_to_term.erl similarity index 99% rename from src/jsx_terms.erl rename to src/jsx_to_term.erl index 2a47f56..5c4cb2f 100644 --- a/src/jsx_terms.erl +++ b/src/jsx_to_term.erl @@ -21,7 +21,7 @@ %% THE SOFTWARE. --module(jsx_terms). +-module(jsx_to_term). -export([to_term/2]). -export([init/1, handle_event/2]).