jakartaee / jakartaee/jsonp-api
Ease testing for JsonValue type
Open
@m0mus is already working on this.
Since Feb 12, 2018.
enhancement
spec
- Dominant language
- Java
- Stars
- 160
- Forks
- 64
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 4
Description
Currently yo determine `JsonValue` type the code should look something like:
```java
JsonValue value = ....;
if (ValueType.OBJECT == value.getValueType()) {
}
if (ValueType.ARRAY == value.getValueType()) {
}
```
What about adding methods to `JsonValue`:
```java
public interface JsonValue {
boolean isObject();
boolean isArray();
boolean isNumber();
boolean isString();
}
```
Contributor 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.
Assessment
This issue has not been assessed yet.