JsonPatch - Tests on empty string throws exception #28019
Labels
affected-few
This issue impacts only small number of customers
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
bug
This issue describes a behavior which is not expected - a bug.
feature-json-patch
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
investigate
severity-blocking
This label is used by an internal tool
Status: Resolved
Milestone
Describe the bug
I want to overwrite an existing json property that is an empty string
""
, and beforehand a test operation is performed. When testing that the value at path/foo
is equal to""
- an exception is thrown with the following error message:The value at 'foo' cannot be null or empty to perform the test operation.
According to RFC6902 section 4.6, I believe it is incorrect to disallow values to be tested in this case.
To Reproduce
Exceptions (if any)
Throw location: /src/Microsoft.AspNetCore.JsonPatch/Internal/DictionaryAdapterOfTU.cs
Further technical details
The text was updated successfully, but these errors were encountered: