jakartaee / jsonp-api

Jakarta JSON Processing
https://eclipse.org/ee4j/jsonp
Other
138 stars 59 forks source link

getLong and isType for JsonObject #369

Open RealYusufIsmail opened 2 years ago

RealYusufIsmail commented 2 years ago

I am wondering if it is possible to add a getLong() method in the JsonObject interface and is also is possible to add is type which check if the specified Object/Array/etc is given

jbescos commented 2 years ago

You can obtain the long value in this way:

JsonObject.getJsonNumber(name).longValue()