Instance Method
apply(_:to:)
Applies the given patch onto the given JSON data.
func apply(_ patch: JSONPatch, to jsonData: Data) throws -> Data
Parameters
patchThe patch to apply.
jsonDataThe data on which to apply the patch.
Return Value
The JSON data with the patch applied.
Discussion
Throws
This function throws an JSONPatchApplier.Error if the application was not successful.