Here you can find the source of getJsonNumberOrNull(JsonObject object, String key)
protected static JsonNumber getJsonNumberOrNull(JsonObject object, String key)
//package com.java2s; //License from project: Apache License import javax.json.JsonNumber; import javax.json.JsonObject; public class Main { protected static JsonNumber getJsonNumberOrNull(JsonObject object, String key) {// w w w . j a va 2 s. co m return object.containsKey(key) && !object.isNull(key) ? object .getJsonNumber(key) : null; } }