Configure integer overflow in json.decode()
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- lua
- Domain
- documentation
Research direction
The payload names no file. Start from the existing reference page for the Tarantool json module, where json.cfg options are documented, and check whether decode_overflow is already described there. Add the option with its two values, clamp (default) and error, plus the per-call form json.decode(data, {decode_overflow = 'error'}) and a note that it applies at any nesting level. Done when the page covers both values and the per-call override, and the behaviour matches commit 9d9923b02f99e0ada3a5cd5f0d5eb2b2fe0abf13.
Written by the indexing model from the issue text.
Description
The decode_overflow option accepts two values:
- clamp (default): values below INT64_MIN become INT64_MIN, and values
above UINT64_MAX become UINT64_MAX. - error: raise an error with the location of the overflowing integer.
Use json.cfg({decode_overflow = 'error'}) for an instance, or
json.decode(data, {decode_overflow = 'error'}) for a single call without
changing the instance settings. The option applies at any nesting level.
In-range integers, floating-point input, and encoding are unchanged.
Requested by @Yukigaru in https://github.com/tarantool/tarantool/commit/9d9923b02f99e0ada3a5cd5f0d5eb2b2fe0abf13.
- Dominant language
- CSS
- Stars
- 16
- Forks
- 49
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tarantool/doc
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Similar issues
-
documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MarketSquare/robotframework-browser#5479 ·
Maintainers usually reply within 1 day
-
documentation review-2.0.0
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dkuenzel/meshcore-home-gateway#106 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
chanzuckerberg/cellxgene-census#1468 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mastra-ai/mastra#29641 · 1 comment ·
Maintainers usually reply within 1 day