decode erlang encoded json into a java script object