public class JsonUtils extends Object
| Constructor and Description |
|---|
JsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <R> R |
fromJson(Object json,
Class<R> cls)
Reads an Object from a JSON string.
|
static de.iip_ecosphere.platform.support.ServerAddress |
serverAddressFromJson(Object json)
Reads a
ServerAddress from a JSON string. |
static String |
toJson(Object obj)
Turns a
ServerAddress into JSON. |
static String |
toJson(de.iip_ecosphere.platform.support.ServerAddress address)
Turns a
ServerAddress into JSON. |
public static de.iip_ecosphere.platform.support.ServerAddress serverAddressFromJson(Object json)
ServerAddress from a JSON string.json - the JSON value, usually a StringtoJson(ServerAddress)public static String toJson(de.iip_ecosphere.platform.support.ServerAddress address)
ServerAddress into JSON.address - the address (may be null)serverAddressFromJson(Object)public static String toJson(Object obj)
ServerAddress into JSON.obj - the object (may be null), must have getters/setters for all attributes and a no-arg constructor
no-arg constructorfromJson(Object, Class)public static <R> R fromJson(Object json, Class<R> cls)
R - the object type, must have getters/setters for all attributes and a no-arg constructorjson - the JSON value (usually a String)cls - the class of the type to readtoJson(Object)Copyright © 2021. All rights reserved.