Marvin.JsonPatch 2.0.0 Released

A new major release of Marvin.JsonPatch has just been published (2.0.0).  This new release adds support for dictionaries  – many thanks to MartyZhou for the PR!  Moreover, thanks to the backport from Microsoft.AspNetCore.JsonPatch (which started out as a port of Marvin.JsonPatch + Marvin.JsonPatch.Dynamic), a lot of features and stability improvements that were added over the past few months are now also part of Marvin.JsonPatch.

Wondering what Marvin.JsonPatch is?

JSON Patch (https://tools.ietf.org/html/rfc6902) defines a JSON document structure for expressing a sequence of operations to apply to a JavaScript Object Notation (JSON) document; it is suitable for use with the HTTP PATCH method. The “application/json-patch+json” media type is used to identify such patch documents.

One of the things this can be used for is partial updates for REST-ful API’s, or, to quote the IETF: “This format is also potentially useful in other cases in which it is necessary to make partial updates to a JSON document or to a data structure that has similar constraints (i.e., they can be serialized as an object or an array using the JSON grammar).”

That’s what this package is all about. Web API supports the HttpPatch method, but there’s currently no implementation of the JsonPatchDocument in .NET, making it hard to pass in a set of changes that have to be applied – especially if you’re working cross-platform and standardization of your API is essential.  The package can be used the client and/or on the server.

You can find the new version at NuGet.   Happy coding! :)

 Tweet about this on TwitterShare on LinkedInShare on Facebook

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *