java.lang.Object
io.helidon.jsonrpc.core.JsonUtil
Provides JSONP to/from JSONB conversions. Not efficient, but simple and portable
for now. A more efficient implementation should avoid serialization.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonBuilderFactory
Global JSON builder factory used by JSON-RPC implementation. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonObject
jsonbToJsonp
(Object object) Convert a JSONB instance into a JSONP instance.static <T> T
jsonpToJsonb
(JsonObject object, Class<T> type) Convert a JSONP instance into a JSONB instance.
-
Field Details
-
JSON_BUILDER_FACTORY
Global JSON builder factory used by JSON-RPC implementation.
-
-
Method Details
-
jsonbToJsonp
Convert a JSONB instance into a JSONP instance.- Parameters:
object
- the object- Returns:
- the JSON value
-
jsonpToJsonb
Convert a JSONP instance into a JSONB instance.- Type Parameters:
T
- the type of the instance- Parameters:
object
- the JSON objecttype
- the JSONB type- Returns:
- the JSONB instance
-