During a performance test, I encountered an issue where the response contained items like:
{"item":{"id":2733382000000000049}}
When parsed using k6's response.json()
, it appeared as :
{"item":{"id":2733382000000000000}}
This resulted in the last digits being replaced with 0s.
Additionally, attempting to log the response.body()
produced an error:
ERRO[0001] TypeError: Value is not an object: {"item":{"id":2733382000000000049}}
It seems that JavaScript has limitations in handling large integers, as shown by the maximum safe integer value:
> console.log(Number.MAX_SAFE_INTEGER)
9007199254740991
Is there any way to work around this limitation in k6 without making changes to the backend code?