#community-help

Number Representation in JSON: stats.json vs metrics.json

TLDR Alessandro inquired about different number representation in the output of stats.json and metrics.json. Kishore Nallan explained it's due to differing capabilities in JSON implementations.

Powered by Struct AI
3
13mo
Solved
Join the chat
Aug 01, 2022 (13 months ago)
Alessandro
Photo of md5-54f045fadc868912ffcd8bfcfccbccc9
Alessandro
07:08 AM
hi everyone, I was checking the output of stats.json and metrics.json endpoints, I was wondering why stats.json outputs values as number while metrics.json outputs values as string even if I think that metrics values are all numbers
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:23 AM
Some JSON implementations are unable to represent the full range of 64-bit unsigned integers. String seemed easier to read, and also decimals could be represented cleanly.
Alessandro
Photo of md5-54f045fadc868912ffcd8bfcfccbccc9
Alessandro
07:36 AM
ok, thank you !