Package org.openrefine.util
Class JSONUtilities
- java.lang.Object
-
- org.openrefine.util.JSONUtilities
-
public class JSONUtilities extends Object
-
-
Constructor Summary
Constructors Constructor Description JSONUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
append(com.fasterxml.jackson.databind.node.ArrayNode array, int v)
static void
append(com.fasterxml.jackson.databind.node.ArrayNode sheetRecords, com.fasterxml.jackson.databind.node.ObjectNode sheetRecord)
static void
append(com.fasterxml.jackson.databind.node.ArrayNode a, String element)
static List<com.fasterxml.jackson.databind.JsonNode>
getArray(com.fasterxml.jackson.databind.JsonNode obj, String key)
static com.fasterxml.jackson.databind.node.ArrayNode
getArray(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
static boolean
getBoolean(com.fasterxml.jackson.databind.JsonNode obj, String key, boolean def)
static int
getInt(com.fasterxml.jackson.databind.JsonNode obj, String key, int def)
static int[]
getIntArray(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
static int
getIntElement(com.fasterxml.jackson.databind.node.ArrayNode a, int i, int def)
static long
getLong(com.fasterxml.jackson.databind.JsonNode obj, String key, long def)
static com.fasterxml.jackson.databind.node.ObjectNode
getObject(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
static com.fasterxml.jackson.databind.node.ObjectNode
getObjectElement(com.fasterxml.jackson.databind.node.ArrayNode a, int i)
static String
getString(com.fasterxml.jackson.databind.JsonNode obj, String key, String def)
static String[]
getStringArray(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
static void
safeInc(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
static void
safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, boolean value)
static void
safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, double value)
static void
safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, long value)
static void
safePut(com.fasterxml.jackson.databind.node.ObjectNode options, String key, com.fasterxml.jackson.databind.JsonNode rootElement)
static void
safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, String value)
static Object[]
toArray(com.fasterxml.jackson.databind.node.ArrayNode v)
static Comparable[]
toSortableArray(com.fasterxml.jackson.databind.node.ArrayNode v)
-
-
-
Method Detail
-
getObject
public static com.fasterxml.jackson.databind.node.ObjectNode getObject(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
-
getString
public static String getString(com.fasterxml.jackson.databind.JsonNode obj, String key, String def)
-
getInt
public static int getInt(com.fasterxml.jackson.databind.JsonNode obj, String key, int def)
-
getLong
public static long getLong(com.fasterxml.jackson.databind.JsonNode obj, String key, long def)
-
getBoolean
public static boolean getBoolean(com.fasterxml.jackson.databind.JsonNode obj, String key, boolean def)
-
getArray
public static com.fasterxml.jackson.databind.node.ArrayNode getArray(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
-
getArray
public static List<com.fasterxml.jackson.databind.JsonNode> getArray(com.fasterxml.jackson.databind.JsonNode obj, String key)
-
getIntArray
public static int[] getIntArray(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
-
getStringArray
public static String[] getStringArray(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
-
getObjectElement
public static com.fasterxml.jackson.databind.node.ObjectNode getObjectElement(com.fasterxml.jackson.databind.node.ArrayNode a, int i)
-
getIntElement
public static int getIntElement(com.fasterxml.jackson.databind.node.ArrayNode a, int i, int def)
-
append
public static void append(com.fasterxml.jackson.databind.node.ArrayNode sheetRecords, com.fasterxml.jackson.databind.node.ObjectNode sheetRecord)
-
append
public static void append(com.fasterxml.jackson.databind.node.ArrayNode array, int v)
-
append
public static void append(com.fasterxml.jackson.databind.node.ArrayNode a, String element)
-
safePut
public static void safePut(com.fasterxml.jackson.databind.node.ObjectNode options, String key, com.fasterxml.jackson.databind.JsonNode rootElement)
-
safeInc
public static void safeInc(com.fasterxml.jackson.databind.node.ObjectNode obj, String key)
-
safePut
public static void safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, long value)
-
safePut
public static void safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, double value)
-
safePut
public static void safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, boolean value)
-
safePut
public static void safePut(com.fasterxml.jackson.databind.node.ObjectNode obj, String key, String value)
-
toArray
public static Object[] toArray(com.fasterxml.jackson.databind.node.ArrayNode v)
-
toSortableArray
public static Comparable[] toSortableArray(com.fasterxml.jackson.databind.node.ArrayNode v)
-
-