Files
json-c/tests
Treston Cuzzort ea3756e561 json_patch: compare integer and double test values numerically
RFC 6902 section 4.6 compares JSON numbers by value. The test operation
used json_object_equal(), which treats json_type_int and json_type_double
as different types, so a test of 1.0 against 1 failed.

Use a private comparison for JSON Patch, including numbers nested inside
objects and arrays. Check floating-point range before converting, and
require both integer equality and an exact round trip to reject fractional
values and large integers that would round to the same double.

Add regression cases for both argument orders, nested values, signed and
unsigned limits, fractional values, precision loss and non-number types.

https://www.rfc-editor.org/rfc/rfc6902.txt section 4.6
2026-11-08 21:22:38 -05:00
..
2022-08-13 20:47:20 -07:00
2022-08-13 20:47:20 -07:00
2020-03-31 19:12:45 +08:00
2022-08-13 15:47:40 +03:00
2020-03-31 19:12:45 +08:00
2026-09-07 09:58:09 +08:00