-
public class JsonSerializer
-
-
Field Summary
Fields Modifier and Type Field Description public final static JsonSerializerINSTANCE
-
Method Summary
Modifier and Type Method Description final JsonElementtoJsonElement(Object item)Converts arbitrary object to the JsonElement with the best effort. final Map<String, JsonElement>safeMapValuesToJson(Map<String, Object> $self, InternalLogger internalLogger)This method will convert all values to JSON in a safe way, meaning if serialization fails for the particular value, the process will continue and faulty value will be dropped. -
-
Method Detail
-
toJsonElement
final JsonElement toJsonElement(Object item)
Converts arbitrary object to the JsonElement with the best effort. Any.toString is used as a fallback.
-
safeMapValuesToJson
final Map<String, JsonElement> safeMapValuesToJson(Map<String, Object> $self, InternalLogger internalLogger)
This method will convert all values to JSON in a safe way, meaning if serialization fails for the particular value, the process will continue and faulty value will be dropped.
-
-
-
-