adds more of the functionality to convert form to json.
pretties up the json output to the screen.