CreatePatch creates a patch as specified in http://jsonpatch.com/.
'before' is original, 'after' is the modified struct. The function will return the patch as byte array.
An error will be returned if any of the two structs is nil.
Patch is a slice of JsonPatchOperations
MarshalJSON converts the Patch into a byte array