Class BooleanUtils
java.lang.Object
com.api.jsonata4java.expressions.utils.BooleanUtils
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanconvertJsonNodeToBoolean(com.fasterxml.jackson.databind.JsonNode node) See http://docs.jsonata.org/boolean-functions.html#booleanarg The convertJsonNodeToBoolean method converts the node passed in to a boolean based on the casting semantics defined by JSONata.
-
Constructor Details
-
BooleanUtils
public BooleanUtils()
-
-
Method Details
-
convertJsonNodeToBoolean
public static boolean convertJsonNodeToBoolean(com.fasterxml.jackson.databind.JsonNode node) See http://docs.jsonata.org/boolean-functions.html#booleanarg The convertJsonNodeToBoolean method converts the node passed in to a boolean based on the casting semantics defined by JSONata.$boolean(arg)
Casts the argument to a Boolean using the following rules Argument type Result Boolean unchanged string: empty false string: non-empty true number: 0 false number: non-zero true null false array: empty false array: contains a member that casts to true true array: all members cast to false false object: empty false object: non-empty true function: (functions are not currently supported) false - Parameters:
node- The node to convert to a boolean- Returns:
- boolean The converted value
-