implement the json.Marshaler interface for Patch