changes name of jsx_format to jsx_to_json and jsx_terms to jsx_to_term

This commit is contained in:
alisdair sullivan 2011-11-28 17:30:55 -08:00
parent 6a81f7885b
commit 1fad948aec
4 changed files with 11 additions and 9 deletions

View file

@ -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, [

View file

@ -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.

View file

@ -21,7 +21,7 @@
%% THE SOFTWARE.
-module(jsx_format).
-module(jsx_to_json).
-export([to_json/2]).
-export([init/1, handle_event/2]).

View file

@ -21,7 +21,7 @@
%% THE SOFTWARE.
-module(jsx_terms).
-module(jsx_to_term).
-export([to_term/2]).
-export([init/1, handle_event/2]).