eclipse-ee4j / eclipse-ee4j/parsson
JsonNumber::isIntegral did not have the same semantic meaning as in json-schema
Open
- Dominant language
- Java
- Stars
- 17
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
unsure if it is a bug in json-p spec or here.
in json-schema 0.0 or 1.0 are valid integer values, but not for JsonNumber::isIntegral.
instead of
```java
public boolean isIntegral() {
bigdecimal().scale() == 0
}
```
it should be
```java
public boolean isIntegral() {
bigdecimal().stripTrailingZeros().scale() <= 0
}
```
Contributor guide
Assessment
This issue has not been assessed yet.