-
Notifications
You must be signed in to change notification settings - Fork 4
Proplists
Eric Pailleau edited this page Dec 30, 2017
·
5 revisions
JSON decoding to Erlang proplists need the option {mode, proplist}
.
1> {ok, A} = jason:decode_file("priv/ref1.json",[{mode, proplist}, {return, tuple}]).
{ok,[{glossary,[{title,"example glossary"},
{'GlossDiv',[{title,"S"},
{'GlossList',[{'GlossEntry',[{'ID',"SGML"},
{'SortAs',"SGML"},
{'GlossTerm',"Standard Generalized Markup Language"},
{'Acronym',"SGML"},
{'Abbrev',"ISO 8879:1986"},
{'GlossDef',[{para,"A meta-markup language, used to create markup languages such as DocBook."},
{'GlossSeeAlso',[[...]|...]}]},
{'GlossSee',"markup"}]}]}]}]}]}