gravity9-tech / json-patch-path

An RFC 6902 (JSON Patch) and reverse, plus RFC 7386 (JSON Merge Patch), implementation in Java using Jackson (2.x)
Other
11 stars 2 forks source link

PatchTestOperation fails when patching float value #17

Closed MateuszGravity9 closed 1 year ago

MateuszGravity9 commented 1 year ago

Issue copied from: https://github.com/java-json-tools/json-patch/issues/137

There seems to be an issue related to patching Float values in JsonNumEquals.

When patching a model with a Float value - the TestOperation value is deserialized to Double - and comparing a Double to a Float numEquals fails.

I've included a testcase, that shows the issue -> see TestFloatDoubleProblem.java jsonpatch-issue.zip

Kindly regards.

MateuszGravity9 commented 1 year ago

Original issue https://github.com/java-json-tools/json-patch/issues/137