Class SqlJsonUtils
java.lang.Object
org.apache.flink.table.runtime.functions.SqlJsonUtils
Utilities for JSON functions.
Note that these methods are called from generated code.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumPath spec has two different modes: lax mode and strict mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ArrayNodeReturns a newArrayNode.static org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNodeReturns a newObjectNode.static org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.JsonNodeFactoryReturns theJsonNodeFactoryfor creating nodes.static booleanisJsonArray(String input) static booleanisJsonObject(String input) static booleanisJsonScalar(String input) static booleanisJsonValue(String input) static BooleanjsonExists(String input, String pathSpec) static BooleanjsonExists(String input, String pathSpec, org.apache.flink.table.api.JsonExistsOnError errorBehavior) static ObjectjsonQuery(String input, String pathSpec, SqlJsonUtils.JsonQueryReturnType returnType, org.apache.flink.table.api.JsonQueryWrapper wrapperBehavior, org.apache.flink.table.api.JsonQueryOnEmptyOrError emptyBehavior, org.apache.flink.table.api.JsonQueryOnEmptyOrError errorBehavior) static ObjectjsonValue(String input, String pathSpec, org.apache.flink.table.api.JsonValueOnEmptyOrError emptyBehavior, Object defaultValueOnEmpty, org.apache.flink.table.api.JsonValueOnEmptyOrError errorBehavior, Object defaultValueOnError) static StringserializeJson(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode node) Serializes the givenJsonNodeto a JSON string.
-
Method Details
-
getNodeFactory
public static org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.JsonNodeFactory getNodeFactory()Returns theJsonNodeFactoryfor creating nodes. -
createObjectNode
public static org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode createObjectNode()Returns a newObjectNode. -
createArrayNode
public static org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ArrayNode createArrayNode()Returns a newArrayNode. -
serializeJson
public static String serializeJson(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode node) Serializes the givenJsonNodeto a JSON string. -
jsonExists
-
jsonExists
-
jsonValue
-
jsonQuery
public static Object jsonQuery(String input, String pathSpec, SqlJsonUtils.JsonQueryReturnType returnType, org.apache.flink.table.api.JsonQueryWrapper wrapperBehavior, org.apache.flink.table.api.JsonQueryOnEmptyOrError emptyBehavior, org.apache.flink.table.api.JsonQueryOnEmptyOrError errorBehavior) -
isJsonValue
-
isJsonObject
-
isJsonArray
-
isJsonScalar
-