public class JsonUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonUtils.ColumnPositionDeserializer |
static class |
JsonUtils.ColumnPositionSerializer |
static class |
JsonUtils.DistributionDeserializer |
static class |
JsonUtils.DistributionSerializer |
static class |
JsonUtils.NameIdentifierDeserializer
Custom JSON deserializer for NameIdentifier objects.
|
static class |
JsonUtils.NameIdentifierSerializer
Custom JSON serializer for NameIdentifier objects.
|
static class |
JsonUtils.PartitioningDeserializer |
static class |
JsonUtils.PartitioningSerializer |
static class |
JsonUtils.SortOrderDeserializer |
static class |
JsonUtils.SortOrderSerializer |
static class |
JsonUtils.TypeDeserializer
Custom JSON deserializer for Gravitino Type objects.
|
static class |
JsonUtils.TypeSerializer
Custom JSON serializer for Gravitino Type objects.
|
| Constructor and Description |
|---|
JsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getInt(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node) |
static long |
getLong(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node) |
static java.lang.String |
getString(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
Get a string value from a JSON node property.
|
static java.lang.String[] |
getStringArray(com.fasterxml.jackson.databind.node.ArrayNode node) |
static java.util.List<java.lang.String> |
getStringList(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
Get a list of strings from a JSON node property or throw an exception if the property is
missing.
|
static java.util.List<java.lang.String> |
getStringListOrNull(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
Get a list of strings from a JSON node property.
|
static com.fasterxml.jackson.databind.ObjectMapper |
objectMapper()
Get the shared ObjectMapper instance for JSON serialization/deserialization.
|
static FunctionArg |
readFunctionArg(com.fasterxml.jackson.databind.JsonNode node) |
static void |
writeFunctionArg(FunctionArg arg,
com.fasterxml.jackson.core.JsonGenerator gen) |
public static com.fasterxml.jackson.databind.ObjectMapper objectMapper()
public static java.util.List<java.lang.String> getStringListOrNull(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
property - The property name.node - The JSON node.public static java.util.List<java.lang.String> getStringList(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
property - The property name.node - The JSON node.java.lang.IllegalArgumentException - if the property is missing in the JSON node.public static java.lang.String[] getStringArray(com.fasterxml.jackson.databind.node.ArrayNode node)
public static int getInt(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
public static long getLong(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
public static FunctionArg readFunctionArg(com.fasterxml.jackson.databind.JsonNode node)
public static void writeFunctionArg(FunctionArg arg, com.fasterxml.jackson.core.JsonGenerator gen) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getString(java.lang.String property,
com.fasterxml.jackson.databind.JsonNode node)
property - The property name.node - The JSON node.java.lang.IllegalArgumentException - if the property is missing in the JSON node.