public class Serialization
extends java.lang.Object
| Constructor and Description |
|---|
Serialization() |
| Modifier and Type | Method and Description |
|---|---|
static void |
everythingFromJson(java.lang.Object object,
javax.json.JsonValue json)
Deserializes the given object by loading almost every field from Json, using a full serializer.
|
static javax.json.JsonValue |
everythingToJson(java.lang.Object object)
Serializes the given object by converting almost every field to Json, using a full serializer.
|
static void |
fromJsonWithFilter(java.lang.Object object,
javax.json.JsonValue json,
java.util.function.Predicate<java.lang.reflect.Field> filter)
Deserializes the given object by loading all the fields satisfying the given filter from Json, using a full
serializer.
|
static javax.json.JsonValue |
toJsonWithFieldFilter(java.lang.Object object,
java.util.function.Predicate<java.lang.reflect.Field> filter)
Serializes the given object by converting all the fields satisfying the given filter to Json, using a full serializer.
|
public static javax.json.JsonValue everythingToJson(java.lang.Object object)
object - The object to be serialized.public static void everythingFromJson(java.lang.Object object,
javax.json.JsonValue json)
object - The object to be deserialized.json - The Json to deserialize the object with.public static javax.json.JsonValue toJsonWithFieldFilter(java.lang.Object object,
java.util.function.Predicate<java.lang.reflect.Field> filter)
object - The object to be serialized.filter - The filter to apply to the fields of the object. See Fields for possible filters.public static void fromJsonWithFilter(java.lang.Object object,
javax.json.JsonValue json,
java.util.function.Predicate<java.lang.reflect.Field> filter)
object - The object to be deserialized.json - The Json to deserialize the object with.filter - The filter to apply to the fields of the object. See Fields for possible filters.