Add json input validation.
Convert all exceptions into json responses.
Reformat validation error message.