Skip to content

Conversation

@escherba
Copy link

Although JSON specification does not set any limits on how large
(or small) JSON numeric values can be, JSONKit throws an error
when it encounters numbers that are too large to represent on a
given system. This is may be an undesirable behavior when dealing
with some web-service providers that may, for example, return very
large TTL values (to represent non-expiring timestamps) or metrics
that are very close to zero and could be easily represented as such.

JKParseOptionTruncateNumbers is a parse option introduced here that,
when set, causes parser to ignore overflow-related numeric errors.
When this option is not set, the parser behaves in a normal way.

Although JSON specification does not set any limits on how large
(or small) JSON numeric values can be, JSONKit throws an error
when it encounters numbers that are too large to represent on a
given system. This is undesirable behavior when dealing with some
web-service providers that may, for example, return very large TTL
values (to represent non-expiring timestamps) or metrics that are
very close to zero and could be easily represented as such.

JKParseOptionTruncateNumbers is a parse option introduced here that,
when set, causes parser to ignore overflow-related numeric errors.
When this option is not set, the parser behaves in a normal way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant