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