convert json to html form and vice versa