Skip to content

Commit 07c0545

Browse files
cursoragentsimbo1905
andcommitted
Issue #119 Fold numeric design notes into README
Co-authored-by: simbo1905 <simbo1905@60hertz.com>
1 parent 0903da3 commit 07c0545

File tree

3 files changed

+8
-176
lines changed

3 files changed

+8
-176
lines changed

DESIGN_CHOICES.md

Lines changed: 0 additions & 173 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ java -cp ./json-java21/target/java.util.json-*.jar:./json-java21/target/test-cla
2727

2828
*Replace `*` with the actual version number from the JAR filename.*
2929

30-
## Design notes
30+
## Numeric handling (JsonNumber and native Java numbers)
3131

32-
- **Numeric handling (JsonNumber, BigDecimal/BigInteger)**: see `DESIGN_CHOICES.md`
32+
Prior versions of this backport included convenience entry points for building JSON numbers from `BigDecimal` / `BigInteger`. Upstream has moved away from that shape: `JsonNumber` preserves the JSON number text and you convert explicitly to native Java numeric types depending on your policy (lossless via `toString()` + `BigDecimal`, or range/precision-limited via `toLong()` / `toDouble()`).
33+
34+
For runnable examples (including counter-examples where conversions throw or lose precision, plus a pattern-matching “map to native types” helper), see:
35+
36+
- `json-java21/src/test/java/jdk/sandbox/java/util/json/examples/DesignChoicesExamples.java`
37+
- `json-java21/src/test/java/jdk/sandbox/java/util/json/DesignChoicesNumberExamplesTest.java`
3338

3439
## API Overview
3540

json-java21/src/test/java/jdk/sandbox/java/util/json/examples/DesignChoicesExamples.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Standalone examples demonstrating numeric design choices.
2020
*
2121
* <p>
22-
* This file mirrors the examples in {@code DESIGN_CHOICES.md}.
22+
* See the repository README for context and pointers.
2323
*/
2424
public final class DesignChoicesExamples {
2525

0 commit comments

Comments
 (0)