-
Extended JSON parsing
Apparently .j.k loses precision with large enough numbers:
q)`long$.j.k"1471220573128024107" 1471220573128024064
However I’m trying to interface with a program that expects the number to round-trip, i.e. if I export the JSON again, it should contain exactly 1471220573128024107, so I can’t use .j.k to import the file as it loses precision. There are parsers for other languages that can convert to long integers when a number is encountered and only force a conversion to float when there is a decimal point or exponent in the JSON.
Is there any existing library that can do the same for q?
Log in to reply.