updated examples to match new decoder api

This commit is contained in:
alisdair sullivan 2010-05-25 21:05:37 -07:00
parent 41292d4077
commit 537ad61223
3 changed files with 42 additions and 2 deletions

View file

@ -9,7 +9,7 @@
pretty(JSON, Opts) ->
Init = init(parse_opts(Opts, #opts{})),
{{_, Result}, Rest} = (jsx:decoder({{pretty_printer, jsx_event}, Init}, []))(JSON),
{Result, Rest} = (jsx:decoder({{jsx_prettify, jsx_event}, Init}, []))(JSON),
case jsx:tail_clean(Rest) of
true -> Result
; _ -> exit(badarg)