Jsonify the response of put and delete methods and add a status code.