class JavaxJson {

    @SuppressWarnings("WeakerAccess")
    public static Optional<JsonObject> optObject(final JsonObject json, final String key) {
        return Optional.ofNullable(json.get(key)).filter(JsonObject.class::isInstance).map(JsonObject.class::cast);
    }

    private  JavaxJson();

}