diff --git a/examples/jsx_parser.erl b/examples/jsx_parser.erl index a24ae8b..4b9f0e8 100644 --- a/examples/jsx_parser.erl +++ b/examples/jsx_parser.erl @@ -34,7 +34,7 @@ %% also is not streaming, though it could be modified to parse partial objects/lists. decode(JSON) -> - P = jsx:decoder({jsx_parser, event, []}, []), + P = jsx:parser({jsx_parser, event, []}, []), case P(JSON) of {incomplete, _} -> {error, badjson} diff --git a/examples/jsx_prettify.erl b/examples/jsx_prettify.erl index 020f6f6..405e396 100644 --- a/examples/jsx_prettify.erl +++ b/examples/jsx_prettify.erl @@ -34,7 +34,7 @@ pretty(JSON, Opts) -> Init = init(parse_opts(Opts, #opts{})), - P = jsx:decoder({jsx_prettify, prettify, Init}, []), + P = jsx:parser({jsx_prettify, prettify, Init}, []), case P(JSON) of {incomplete, _} -> {error, badjson} ; {error, badjson} -> {error, badjson} diff --git a/examples/jsx_stream_parser.erl b/examples/jsx_stream_parser.erl index ce079f9..35898d2 100644 --- a/examples/jsx_stream_parser.erl +++ b/examples/jsx_stream_parser.erl @@ -27,7 +27,7 @@ -export([decoder/1, event/2]). decoder(Opts) -> - Decoder = jsx:decoder({jsx_stream_parser, event, 0}, Opts), + Decoder = jsx:parser({jsx_stream_parser, event, 0}, Opts), fun(Stream) -> try case Decoder(Stream) of {incomplete, F} -> {incomplete, F} diff --git a/examples/jsx_verify.erl b/examples/jsx_verify.erl index f6ef848..7d6776d 100644 --- a/examples/jsx_verify.erl +++ b/examples/jsx_verify.erl @@ -32,7 +32,7 @@ %% also is not streaming, though it could be modified to parse partial objects/lists. is_json(JSON) -> - P = jsx:decoder({jsx_verify, event, ok}, []), + P = jsx:parser({jsx_verify, event, ok}, []), case P(JSON) of {incomplete, _} -> false