public class Serialization extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> String |
asJson(T object) |
static <T> String |
asYaml(T object) |
static <T> T |
clone(T resource)
Create a copy of the resource via serialization.
|
static com.fasterxml.jackson.databind.ObjectMapper |
jsonMapper() |
static <T> T |
unmarshal(InputStream is)
Unmarshals a stream.
|
static <T> T |
unmarshal(InputStream is,
Class<T> type)
Unmarshals an
InputStream. |
static <T> T |
unmarshal(InputStream is,
Class<T> type,
Map<String,String> parameters)
Unmarshals an
InputStream optionally performing placeholder substitution to the stream. |
static <T> T |
unmarshal(InputStream is,
Map<String,String> parameters)
Unmarshals a stream optionally performing placeholder substitution to the stream.
|
static <T> T |
unmarshal(InputStream is,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Unmarshals a stream.
|
static <T> T |
unmarshal(InputStream is,
com.fasterxml.jackson.databind.ObjectMapper mapper,
Map<String,String> parameters)
Unmarshals a stream optionally performing placeholder substitution to the stream.
|
static <T> T |
unmarshal(InputStream is,
com.fasterxml.jackson.core.type.TypeReference<T> type)
Unmarshals an
InputStream. |
static <T> T |
unmarshal(InputStream is,
com.fasterxml.jackson.core.type.TypeReference<T> type,
Map<String,String> parameters)
Unmarshals an
InputStream optionally performing placeholder substitution to the stream. |
static <T> T |
unmarshal(String str)
Unmarshals a
String |
static <T> T |
unmarshal(String str,
Class<T> type)
Unmarshals a
String |
static <T> T |
unmarshal(String str,
Class<T> type,
Map<String,String> parameters)
Unmarshals a
String optionally performing placeholder substitution to the String. |
static com.fasterxml.jackson.databind.ObjectMapper |
yamlMapper() |
public static com.fasterxml.jackson.databind.ObjectMapper jsonMapper()
public static com.fasterxml.jackson.databind.ObjectMapper yamlMapper()
public static <T> String asJson(T object)
public static <T> String asYaml(T object)
public static <T> T unmarshal(InputStream is)
T - The target type.is - The InputStream.public static <T> T unmarshal(InputStream is, Map<String,String> parameters)
T - The target type.is - The InputStream.parameters - A Map with parameters for placeholder substitution.public static <T> T unmarshal(InputStream is, com.fasterxml.jackson.databind.ObjectMapper mapper)
T - The target type.is - The InputStream.mapper - The ObjectMapper to use.public static <T> T unmarshal(InputStream is, com.fasterxml.jackson.databind.ObjectMapper mapper, Map<String,String> parameters)
T - The target type.is - The InputStream.mapper - The ObjectMapper to use.parameters - A Map with parameters for placeholder substitution.public static <T> T unmarshal(String str)
StringT - template argument denoting typestr - The String.public static <T> T unmarshal(String str, Class<T> type)
StringT - template argument denoting typestr - The String.type - The target type.public static <T> T unmarshal(String str, Class<T> type, Map<String,String> parameters)
String optionally performing placeholder substitution to the String.T - Template argument denoting typestr - The String.type - The target type.parameters - A hashmap containing parameterspublic static <T> T unmarshal(InputStream is, Class<T> type)
InputStream.T - Template argument denoting typeis - The InputStream.type - The type.public static <T> T unmarshal(InputStream is, Class<T> type, Map<String,String> parameters)
InputStream optionally performing placeholder substitution to the stream.T - Template argument denoting typeis - The InputStream.type - The type.parameters - A Map with parameters for placeholder substitution.public static <T> T unmarshal(InputStream is, com.fasterxml.jackson.core.type.TypeReference<T> type)
InputStream.T - Template argument denoting typeis - The InputStream.type - The TypeReference.public static <T> T unmarshal(InputStream is, com.fasterxml.jackson.core.type.TypeReference<T> type, Map<String,String> parameters)
InputStream optionally performing placeholder substitution to the stream.T - Template argument denoting typeis - The InputStream.type - The TypeReference.parameters - A Map with parameters for placeholder substitution.public static <T> T clone(T resource)
IllegalArgumentException - if the cloning cannot be performedCopyright © 2015–2020 Red Hat. All rights reserved.