serialize form to json and fill form from json