public final class JsonUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addToArray(Object param,
JsonArrayBuilder jsonArrayBuilder) |
static void |
addToObject(String key,
Object param,
JsonObjectBuilder jsonObjectBuilder) |
static Object |
convertJsonValue(Object jsonValue,
Class desiredType) |
static Object[] |
fromJsonArray(JsonArray jsonArray) |
static JsonValue |
nullSafe(String input) |
static JsonArray |
readJsonArray(String jsonString) |
static JsonObject |
readJsonObject(String jsonString) |
static Map<String,String> |
readJsonProperties(String jsonString) |
static JsonArray |
toJsonArray(List<String> strings) |
static JsonArray |
toJSONArray(Object[] array) |
static JsonArrayBuilder |
toJsonArrayBuilder(byte[] byteArray) |
static JsonObject |
toJsonObject(Map<String,?> map) |
public static Object[] fromJsonArray(JsonArray jsonArray) throws Exception
Exception
public static void addToObject(String key, Object param, JsonObjectBuilder jsonObjectBuilder)
public static void addToArray(Object param, JsonArrayBuilder jsonArrayBuilder)
public static JsonObject toJsonObject(Map<String,?> map)
public static JsonArrayBuilder toJsonArrayBuilder(byte[] byteArray)
public static JsonObject readJsonObject(String jsonString)
Copyright © 2018 JBoss by Red Hat. All rights reserved.