public final class XPFJSONSerializationHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper(Set<SerializationScope> scopes)
Returns an ObjectMapper for the given set of scopes.
|
static String |
marshalToJSON(Object objectToSerialize,
Set<SerializationScope> scopes)
Serializes the given object to JSON, skipping fields whose @SkipSerialization scopes
intersect with the provided scopes set.
|
static <T> T |
unmarshalFromJSON(String json,
Class<T> clazz)
Deserializes the given JSON string to specified class.
|
static <T> T |
unmarshalFromJSON(String json,
com.fasterxml.jackson.databind.JavaType javaType)
Deserializes the given JSON string to the specified JavaType.
|
static <T> T |
unmarshalFromJSON(String json,
com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
Deserializes the given JSON string to the specified TypeReference type.
|
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper(Set<SerializationScope> scopes)
scopes - the serialization scopespublic static String marshalToJSON(Object objectToSerialize, Set<SerializationScope> scopes)
objectToSerialize - the object to serializescopes - the scopes to skippublic static <T> T unmarshalFromJSON(String json, Class<T> clazz)
T - the type of the deserialized entityjson - the JSON stringclazz - the class to deserialize topublic static <T> T unmarshalFromJSON(String json, com.fasterxml.jackson.core.type.TypeReference<T> typeReference)
T - the type of the deserialized entityjson - the JSON stringtypeReference - the type referencepublic static <T> T unmarshalFromJSON(String json, com.fasterxml.jackson.databind.JavaType javaType)
T - the type of the deserialized entityjson - the JSON stringjavaType - the type referenceCopyright © 2026. All rights reserved.