Trying to implement a conversion from form request to json request