public static boolean getBoolean ( JsonObject object , String field , boolean defaultValue ) { final JsonValue value = object . get ( field ) ; if ( value == null || value . isNull ( ) ) { return defaultValue ; } else { return value . asBoolean ( ) ; } }
Returns a field in a Json object as a boolean .