- Correctly handle key not found exception when applying patch document to dictionary #40
- Respect STJ options PropertyNameCaseInsensitive setting #42
- Internal dependencies updated
- Adds .NET 9 support
BREAKING CHANGE: SystemTextJsonPatch now supports different property naming policies!
f.e. JsonNamingPolicy.SnakeCaseLower
. Fixes #36
- This means that the path and from of the system text json patch document needs to match the JSON serializer options property naming policy. For example, if the JSON serializer options are set to use camelCase, the patch path should also be in camelCase.
BREAKING CHANGE: Exception types have been changed.
JsonPatchException
-base exception type now containsFailedOperation
andAffectedObject
properties. These properties are populated with the failed operation when the operation is available. This change is to provide more information about the failed operation and the affected object. Fixes: #26NotSupportedException
andInvalidOperationException
are not thrown anymore. Instead,JsonPatchException
is thrown with the appropriate message.JsonPatchTestOperationException
is now thrown only when the test operation fails. Fixes #22
- Adds support for
DenyPatch
attribute to deny access to annotated property #34 - Internal dependencies updated
- Fixes an issue where null and empty string test operation of JsonNode was incorrectly handled #31
- Improved performance of JSON patch test operation
- Adds support for dictionary complex types #29
- Internal dependencies updated
- Added .NET 8 target framework
- All invalid patch operations now correctly throw JsonPatchTestOperationException and malformed patch documents throw JsonPatchException
- Library runtime performance is improved by using throw helpers for throwing exceptions #21
- Possibly breaking change:
JsonPatchTestOperationException
type is now thrown fortest
-operation failures #22
- Fixes an issue where dynamic JsonPatchDocument did not follow
JsonNamingPolicy
option for property names. #19 - Small performance improvements https://github.com/Havunen/SystemTextJsonPatch/commit/da51501d668cddcda000b08e06d28cff75e7a0ce
- Fixes IndexOutOfRangeException in parse path routine
- JsonPatchDocument types now adds required converters using JsonConverterAttribute and converters no longer need to be set manually to JsonSerializerOptions #18
- netstandard2.0 target now depends on System.Text.Json v7
- Small performance optimizations
- Better support for patching arrays by index #15
- Adds .NET 7 to target frameworks
- Updated internal Nuget dependencies
- Fixed readme badges
- Adds netstandard2.0 target framework
- Fixes an issue where removing from the end of JsonNode array did not work
- Small performance improvements
- Fixes an issue where copy operation ignored System.Text.Json options. Github #13
- Code cleaning
- Fixes an issue where copying null string value to another dynamic object deleted the original property instead of setting it null
- Fixes an issue where operation value was serialized even when not needed
- Parsing logic now follows System.Text.Json.JsonSerializerOptions.PropertyNameCaseInsensitive option #10
- Added MIT lience to Github
- Performance improvements (https://github.com/Havunen/SystemTextJsonPatch/commit/a7b7c66a920ed0c258dec987d92c4edb0f6534cb https://github.com/Havunen/SystemTextJsonPatch/commit/afd5fbcceee6c1b6be7ee914d258a009f29eb437 https://github.com/Havunen/SystemTextJsonPatch/commit/54a0ab815c88536c89ee976358d7b27c356aed49 ) Thanks to campersau
- Changed property type cache to be thread safe https://github.com/Havunen/SystemTextJsonPatch/commit/7e53a7d92f9cb9a3d4cd5ac7dcea915eeb825a82
- Fixes an issue comparing decimals when applying patch document changes #4
- Improved performance
- Fixed an issue where null value was not accepted for patch operation
- Fixes an issue where custom json converter JsonException messages were overriden in SystemTextJsonPatch
- Added CI build. Thanks to https://github.com/ilmax #3
- Combined SystemTextJson.AspNet and SystemTextJson packages
- Fixes an issue where PATCH error message value did not match the actual value used. (dotnet/aspnetcore#38872)