jakartaee / jakartaee/jsonp-api

Ease testing for JsonValue type

Open
#64 2 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.