public class Serialization
extends java.lang.Object
Constructor and Description |
---|
Serialization() |
Modifier and Type | Method and Description |
---|---|
static <T> java.lang.String |
asJson(T object) |
static <T> java.lang.String |
asYaml(T object) |
static com.fasterxml.jackson.databind.ObjectMapper |
jsonMapper() |
static <T> T |
unmarshal(java.io.InputStream is)
Unmarshals a stream.
|
static <T> T |
unmarshal(java.io.InputStream is,
java.lang.Class<T> type)
Unmarshals an
InputStream . |
static <T> T |
unmarshal(java.io.InputStream is,
java.lang.Class<T> type,
java.util.Map<java.lang.String,java.lang.String> parameters)
Unmarshals an
InputStream optionally performing placeholder substitution to the stream. |
static <T> T |
unmarshal(java.io.InputStream is,
java.util.Map<java.lang.String,java.lang.String> parameters)
Unmarshals a stream optionally performing placeholder substitution to the stream.
|
static <T> T |
unmarshal(java.io.InputStream is,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Unmarshals a stream.
|
static <T> T |
unmarshal(java.io.InputStream is,
com.fasterxml.jackson.databind.ObjectMapper mapper,
java.util.Map<java.lang.String,java.lang.String> parameters)
Unmarshals a stream optionally performing placeholder substitution to the stream.
|
static <T> T |
unmarshal(java.io.InputStream is,
com.fasterxml.jackson.core.type.TypeReference<T> type)
Unmarshals an
InputStream . |
static <T> T |
unmarshal(java.io.InputStream is,
com.fasterxml.jackson.core.type.TypeReference<T> type,
java.util.Map<java.lang.String,java.lang.String> parameters)
Unmarshals an
InputStream optionally performing placeholder substitution to the stream. |
static <T> T |
unmarshal(java.lang.String str,
java.lang.Class<T> type)
Unmarshals a
String |
static <T> T |
unmarshal(java.lang.String str,
java.lang.Class<T> type,
java.util.Map<java.lang.String,java.lang.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> java.lang.String asJson(T object) throws KubernetesClientException
KubernetesClientException
public static <T> java.lang.String asYaml(T object) throws KubernetesClientException
KubernetesClientException
public static <T> T unmarshal(java.io.InputStream is) throws KubernetesClientException
T
- The target type.is
- The InputStream
.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.io.InputStream is, java.util.Map<java.lang.String,java.lang.String> parameters) throws KubernetesClientException
T
- The target type.is
- The InputStream
.parameters
- A Map
with parameters for placeholder substitution.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.io.InputStream is, com.fasterxml.jackson.databind.ObjectMapper mapper)
T
- The target type.is
- The InputStream
.mapper
- The ObjectMapper
to use.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.io.InputStream is, com.fasterxml.jackson.databind.ObjectMapper mapper, java.util.Map<java.lang.String,java.lang.String> parameters)
T
- The target type.is
- The InputStream
.mapper
- The ObjectMapper
to use.parameters
- A Map
with parameters for placeholder substitution.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.lang.String str, java.lang.Class<T> type) throws KubernetesClientException
String
T
- template argument denoting typestr
- The String
.type
- The target type.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.lang.String str, java.lang.Class<T> type, java.util.Map<java.lang.String,java.lang.String> parameters) throws KubernetesClientException
String
optionally performing placeholder substitution to the String.T
- Template argument denoting typestr
- The String
.type
- The target type.parameters
- A hashmap containing parametersKubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.io.InputStream is, java.lang.Class<T> type) throws KubernetesClientException
InputStream
.T
- Template argument denoting typeis
- The InputStream
.type
- The type.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.io.InputStream is, java.lang.Class<T> type, java.util.Map<java.lang.String,java.lang.String> parameters) throws KubernetesClientException
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.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.io.InputStream is, com.fasterxml.jackson.core.type.TypeReference<T> type) throws KubernetesClientException
InputStream
.T
- Template argument denoting typeis
- The InputStream
.type
- The TypeReference
.KubernetesClientException
- KubernetesClientExceptionpublic static <T> T unmarshal(java.io.InputStream is, com.fasterxml.jackson.core.type.TypeReference<T> type, java.util.Map<java.lang.String,java.lang.String> parameters) throws KubernetesClientException
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.KubernetesClientException
- KubernetesClientExceptionCopyright © 2015-2019 Red Hat. All Rights Reserved.