alavrik / erlson

Erlang Simple Object Notation - dynamic name-value dictionary data type and syntax for Erlang
MIT License
81 stars 17 forks source link

eunit support #11

Closed arrowcircle closed 11 years ago

arrowcircle commented 11 years ago

Hi! I trying to use erlson in my eunit test suite, but get error erlson_not_found. I am new to Erlang, could You please tell me what I doing wrong?

more info in gist https://gist.github.com/arrowcircle/5525745

alavrik commented 11 years ago

You need to call erlson:from_json(Json) that parses JSON and turns it into Erlson dict:

event(Json) ->
    Erlson = erlson:from_json(Json)
    Event = Erlson.event,
    Event.