jsonp-api icon indicating copy to clipboard operation
jsonp-api copied to clipboard

Ease testing for JsonValue type

Open glassfishrobot opened this issue 7 years ago • 2 comments

Currently yo determine JsonValue type the code should look something like:

JsonValue value = ....;
if (ValueType.OBJECT == value.getValueType()) {

}
if (ValueType.ARRAY == value.getValueType()) {

}

What about adding methods to JsonValue:

public interface JsonValue {

boolean isObject();

boolean isArray();

boolean isNumber();

boolean isString();

}

glassfishrobot avatar Oct 18 '17 17:10 glassfishrobot

  • Issue Imported From: https://github.com/javaee/jsonp/issues/64
  • Original Issue Raised By:@avalchev
  • Original Issue Assigned To: @m0mus

glassfishrobot avatar Feb 12 '18 07:02 glassfishrobot

@m0mus Commented This is a spec enhancement. We will review it when we will start gathering new major version features.

glassfishrobot avatar Oct 31 '17 23:10 glassfishrobot