JsonPatch in .NET Core
February 22, 2019
A brief Overview
JsonPatch is a way to patch a remote resource using a standard that can be universally applied to any resource. In .NET, if you were to send a PATCH request with your class being serialized upon the method’s entry, you’d get default values for any property you didn’t specify. Well, for a PATCH that’s awfully ambiguous. Did the caller mean to set that property to null or just omit it since this is a PATCH?
Well, there’s a simple solution to this: JSonPatch. A JsonPatch request can be super-simple. It composes 3 parts: