Set json responses on PUT/POST requests