You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the process of comparison of JSONs there is a bug caused by unmarshaling json to interface{}. By default numbers parse to float64. It has 53 bits of mantissa. This causes to precision loss.
Steps to reproduce the issue
Real example:
Add a request json with bigint field to Hoverfly. For example {"id":1236546565217899832645}.
Then try to send a request with an id different from added by the last number. For example {"id":1236546565217899832640}.
Hoverfly will miss the difference.
Simple example:
Write a testcase in json or json partial matcher with the same JSONs.
Observed result
Expected result
Matchers can find the difference between two JSONS with bigint fields.
Additional relevant information
Hoverfly version: latest
Anything that might help us to diagnose the problem
Activity
VintaChlenix commentedon Jan 20, 2025
#1170
Bugfix issue #1169 (#1170)
tommysitu commentedon Jan 20, 2025
Thanks for the quick fix. I will get a release out.