private static Boolean getJsonValueAsBoolean ( JsonValue value ) { if ( value != null ) { if ( value . getValueType ( ) == ValueType . TRUE ) { return true ; } else if ( value . getValueType ( ) == ValueType . FALSE ) { return false ; } } return null ; }
Returns the specified JsonValue as a Boolean or null if it s not a boolean