updated examples for new NEW api

This commit is contained in:
alisdair sullivan 2010-06-01 19:42:57 -07:00
parent ce503823c8
commit 012317e0c5
4 changed files with 56 additions and 4 deletions

View file

@ -34,7 +34,7 @@
pretty(JSON, Opts) ->
Init = init(parse_opts(Opts, #opts{})),
P = jsx:decoder({{jsx_prettify, jsx_event}, Init}, []),
P = jsx:decoder({jsx_prettify, jsx_event, Init}, []),
case P(JSON) of
{incomplete, _} -> {error, badjson}
; {error, badjson} -> {error, badjson}
@ -93,7 +93,7 @@ format(string, String) ->
format(literal, Literal) ->
erlang:atom_to_list(Literal);
format(_, Number) ->
Number;
Number.
indent(Indent, Level) ->