If you’ve been reading this blog, you know one of my open source projects is Marvin.JsonPatch – a portable class lib implementation of the JsonPatch spec with both client & server components. As it’s under active development, there’s quite a lot of interim releases (you can get all of those from my MyGet feed, if you *really* need them ;-)). I don’t post updates for each interim release – but this is a pretty big one, so I figured I’d announce it (if you’ve been using this, you’ll definitely want this update).
The most important feature is support for patching non-IConvertible types. Previously, the component included support for updating values of types that implemented IConvertible, like double, string, … This release greatly expands on that: in essence, if it’s a serializable value, you can patch it. This allows you to patch full object trees, eg: if you’ve got a Person object that has a HomeAddress property of type Address, you no longer have to patch each property of that Address separately – you can now pass through that person’s address in one go, assuming your Address class is serializable.
Next to that, the component is now somewhat more forgiving when it comes to working with lists of data. Previously, you’d have to ensure that when you replaced a List, you’d pass through a List. Now, it’s sufficient when the type you pass through can be serialized to the type you want to replace. Eg: a collection can be serialized to a list, so you’re allowed to pass through a collection as value.
A lot of work has also gone into performance improvements: there’s quite a bit of reflection that’s now avoided (about 50% less, to be exact :)).
And lastly, even though it doesn’t *really* say anything: the number of unit tests has more than doubled since the last release – testing (& stability) was greatly improved (and unit tests are now implemented with XUnit).
In short, if you’ve been using Marvin.JsonPatch, you’ll want this update You can find it on NuGet.
Found an issue, got a comment, feel like contributing? One address: https://github.com/KevinDockx/JsonPatch