updated examples to match new decoder api
This commit is contained in:
parent
41292d4077
commit
537ad61223
3 changed files with 42 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue