Class JsonUtil
- java.lang.Object
-
- org.glassfish.admingui.common.util.JsonUtil
-
public class JsonUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappendUnicodeEscaped(char ch, StringBuilder builder)static jakarta.json.JsonValuegetJsonValue(Object object)Converts an object to a JsonValuestatic Map<String,Object>jsonObjectToMap(jakarta.json.JsonObject object)
-
-
-
Method Detail
-
getJsonValue
public static jakarta.json.JsonValue getJsonValue(Object object) throws jakarta.json.JsonException
Converts an object to a JsonValueThe object must be one of
JsonValue,Collection,Map,String,Integer,Long,Double,Boolean,BigInteger,BigDecimal, a class that has a REST model or an array of one of the above.- Parameters:
object- The object to convert- Returns:
- resulting JsonValue
- Throws:
jakarta.json.JsonException- If the object cannot be converted to a JsonValue
-
appendUnicodeEscaped
public static void appendUnicodeEscaped(char ch, StringBuilder builder)
-
jsonObjectToMap
public static Map<String,Object> jsonObjectToMap(jakarta.json.JsonObject object)
Converts aJsonObjectto aMap<String,Object> where the values of all of the basic type (Integer,Stringetc.), and notJsonValue.- Parameters:
object- The JsonObject to convert to a Map- Returns:
- Since:
- 5.0
- See Also:
jsonValueToRaw(jakarta.json.JsonValue)
-
-