neo icon indicating copy to clipboard operation
neo copied to clipboard

Integer size restriction in StdLib.jsonSerialize

Open csmuller opened this issue 3 years ago • 1 comments

Summary or problem description I'm just curious what the rationale is behind the restriction of integers to max 2^53-1 when serializing to JSON? Specifically, the restriction became an issue when trying to json-serialize a UInt160 as an integer with StdLib.jsonSerialize(...).

Do you have any solution you want to propose? Depends on the answers to the above question. What about 2^160-1?

Neo Version

  • Neo 3

csmuller avatar Jun 07 '21 13:06 csmuller

In some way it comes from RFC 7159, but at the same time given our use case with lots of huge integers this limit is well, too limiting, see #2082 and nspcc-dev/neofs-node#122 also.

roman-khimov avatar Jun 07 '21 14:06 roman-khimov