improve erlang->json->erlang mappings