Clarify exception handling for numbers outside the BigDecimal range

Open
#178 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
java

Research direction

Read the JsonParser.getBigDecimal() and JsonReader.readValue() contracts first, then locate Parsson’s numeric conversion path and compare the 1.1.9 tag with master at 55f9509. The issue is asking maintainers to confirm whether an out-of-range NumberFormatException is wrapped as JsonParsingException, so “done” is a settled contract plus a matching test or documentation note, not a patch startable from the issue alone.

Written by the indexing model from the issue text.

Description

For a syntactically valid JSON number outside the range that BigDecimal can represent, what error should a Parsson caller expect?

The JSON-P 2.1.3 JsonParser.getBigDecimal() contract describes conversion in terms of the BigDecimal constructor. The JsonReader.readValue() contract describes JsonParsingException for an incorrect representation, and RFC 8259, section 6 allows implementations to limit numerical range and precision.

Should a NumberFormatException from this conversion be wrapped as JsonParsingException when reading a JSON value, or is it part of the implementation's numeric range limit? Is the intended behavior different for the streaming numeric accessor?

Six ordinary numeric checks passed with Parsson 1.1.9 and Java 8. The conversion implementation matches between the 1.1.9 tag and master at 55f9509. The out-of-range case was reviewed from source. Could you confirm the intended contract?

Dominant language
Java
Stars
18
Forks
27
Avg merge
20h 35m
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-ee4j/parsson

All issues in eclipse-ee4j/parsson

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.