Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 679c3fd

Browse files
authoredJan 26, 2018
Update java-features.md
1 parent 2e9f78b commit 679c3fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎java-features.md

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ after you extracted value from `Any`, then you can bind it to object using bind-
9191
* any-api => bind-api: Any.as(class)
9292
* any-api => iterator-api: JsonIterator.parse(any)
9393

94+
# About Number
95+
96+
Before 0.9.21, `Object.class` is always decoded as `Double.class`. Starting from 0.9.21, `Object.class` is decoded to Integer/Long/BigInteger/Double when the range fit, same behavior as Jackson.
97+
98+
To have best performance, use `int`, `long` or `double` instead of `Object` if possible. You can control how numbers are converted by using `Any` instead. The raw input is captured in `Any` as it is, so it can convert to `BigInteger`, `BigDecimal` if you want.
99+
94100
# Performance is optional
95101

96102
The default decoding/encoding mode is reflection. We can improve the performance by dynamically generated decoder/encoder class using javassist. It will generate the most efficient code for the given class of input. However, dynamically code generation is not available in all platforms, so static code generation is also provided as an option.

0 commit comments

Comments
 (0)
Please sign in to comment.