updated examples for new api, sort of. should have done all of this on a branch
This commit is contained in:
parent
60943446c0
commit
697d14135a
2 changed files with 5 additions and 11 deletions
|
@ -36,11 +36,8 @@ pretty(JSON, Opts) ->
|
|||
Init = init(parse_opts(Opts, #opts{})),
|
||||
P = jsx:decoder({{jsx_prettify, jsx_event}, Init}, []),
|
||||
try
|
||||
{Result, Rest} = P(JSON),
|
||||
case jsx:tail_clean(Rest) of
|
||||
true -> Result
|
||||
; _ -> throw(badarg)
|
||||
end
|
||||
{Result, _} = P(JSON),
|
||||
Result
|
||||
catch
|
||||
_:_ -> throw(badarg)
|
||||
end.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue