update PUT and DELETE methods to return compliant JSON