java.lang.Object
io.helidon.jsonrpc.core.JsonUtil
Provides JSON binding helpers used by JSON-RPC types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TfromJson(JsonObject object, Class<T> type) Convert a JSON object into a Java object.static <T> TConvert a JSON value into a Java object.static JsonObjecttoJsonObject(Object object) Convert a bound Java object into a JSON object.
-
Method Details
-
toJsonObject
Convert a bound Java object into a JSON object.- Parameters:
object- the object- Returns:
- the JSON object
-
fromJson
Convert a JSON value into a Java object.- Type Parameters:
T- the type of the instance- Parameters:
value- the JSON valuetype- the target type- Returns:
- the Java instance
-
fromJson
Convert a JSON object into a Java object.- Type Parameters:
T- the type of the instance- Parameters:
object- the JSON objecttype- the target type- Returns:
- the Java instance
-