public class JSONParsingUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JSONParsingUtils.STRUCTURE_RECORD_INPUT_INFO |
| Constructor and Description |
|---|
JSONParsingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Object[] |
extractArrayKeyword(com.fasterxml.jackson.databind.JsonNode node,
String keyword,
boolean isRequired) |
static Object[] |
extractArrayKeyword(com.fasterxml.jackson.databind.JsonNode node,
String keyword,
boolean isRequired,
boolean extractJsonObjectsAsNodes) |
static Boolean |
extractBooleanKeyword(com.fasterxml.jackson.databind.JsonNode node,
String keyword,
boolean isRequired) |
static Double |
extractDoubleKeyword(com.fasterxml.jackson.databind.JsonNode node,
String keyword,
boolean isRequired) |
static Integer |
extractIntKeyword(com.fasterxml.jackson.databind.JsonNode node,
String keyword,
boolean isRequired) |
static Object |
extractObject(com.fasterxml.jackson.databind.JsonNode node) |
static Object |
extractObject(com.fasterxml.jackson.databind.JsonNode node,
boolean extractJsonObjectsAsNode) |
static String |
extractStringKeyword(com.fasterxml.jackson.databind.JsonNode node,
String keyword,
boolean isRequired) |
static StructureRecord |
getStructureRecord(com.fasterxml.jackson.databind.JsonNode node,
JSONParsingUtils.STRUCTURE_RECORD_INPUT_INFO inputInfo) |
static List<StructureRecord> |
getStructureRecords(com.fasterxml.jackson.databind.JsonNode node,
String keyword,
JSONParsingUtils.STRUCTURE_RECORD_INPUT_INFO inputInfo,
boolean isRequired) |
static void |
jsonNodeToJavaField(com.fasterxml.jackson.databind.JsonNode node,
Object targetObj,
String fieldName,
boolean FlagExactFieldTypeMatch) |
static String |
objectToJsonField(Object obj) |
static String |
toJsonField(double[] d) |
public static void jsonNodeToJavaField(com.fasterxml.jackson.databind.JsonNode node,
Object targetObj,
String fieldName,
boolean FlagExactFieldTypeMatch)
throws Exception
Exceptionpublic static String extractStringKeyword(com.fasterxml.jackson.databind.JsonNode node, String keyword, boolean isRequired) throws Exception
node - keyword - isRequired - Exception - with the JSON error or missing value error (if isRequired = true)public static Double extractDoubleKeyword(com.fasterxml.jackson.databind.JsonNode node, String keyword, boolean isRequired) throws Exception
node - keyword - isRequired - Exception - with the JSON error or missing value error (if isRequired = true)public static Integer extractIntKeyword(com.fasterxml.jackson.databind.JsonNode node, String keyword, boolean isRequired) throws Exception
node - keyword - isRequired - Exception - with the JSON error or missing value error (if isRequired = true)public static Boolean extractBooleanKeyword(com.fasterxml.jackson.databind.JsonNode node, String keyword, boolean isRequired) throws Exception
node - keyword - isRequired - Exception - with the JSON error or missing value error (if isRequired = true)public static Object[] extractArrayKeyword(com.fasterxml.jackson.databind.JsonNode node, String keyword, boolean isRequired) throws Exception
Exceptionpublic static Object[] extractArrayKeyword(com.fasterxml.jackson.databind.JsonNode node, String keyword, boolean isRequired, boolean extractJsonObjectsAsNodes) throws Exception
Exceptionpublic static Object extractObject(com.fasterxml.jackson.databind.JsonNode node)
public static Object extractObject(com.fasterxml.jackson.databind.JsonNode node, boolean extractJsonObjectsAsNode)
node - public static String toJsonField(double[] d)
d - public static List<StructureRecord> getStructureRecords(com.fasterxml.jackson.databind.JsonNode node, String keyword, JSONParsingUtils.STRUCTURE_RECORD_INPUT_INFO inputInfo, boolean isRequired) throws Exception
Exceptionpublic static StructureRecord getStructureRecord(com.fasterxml.jackson.databind.JsonNode node, JSONParsingUtils.STRUCTURE_RECORD_INPUT_INFO inputInfo) throws Exception
ExceptionCopyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.