Package com.eclipsesource.json

Examples of com.eclipsesource.json.JsonValue.asDouble()


    }

    public static double getDouble(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asDouble();
    }

    public static double getDouble(JsonObject object, String field, double defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
View Full Code Here


    public static double getDouble(JsonObject object, String field, double defaultValue) {
        final JsonValue value = object.get(field);
        if (value == null) {
            return defaultValue;
        } else {
            return value.asDouble();
        }
    }

    public static float getFloat(JsonObject object, String field) {
        final JsonValue value = object.get(field);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.