Package com.couchbase.client.core.utils
Class DefaultObjectMapper
java.lang.Object
com.couchbase.client.core.utils.DefaultObjectMapper
Provides global access to the services of a Jackson
ObjectMapper
with default configuration.- Since:
- 1.6.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectWriter
static ObjectReader
reader()
static JsonNode
readTree
(byte[] content) static JsonNode
readTree
(InputStream src) static JsonNode
static JsonNode
static <T> T
readValue
(byte[] content, int offset, int len, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
static <T> T
readValue
(byte[] content, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
static <T> T
readValue
(InputStream src, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) static <T> T
readValue
(InputStream src, Class<T> valueType) static <T> T
static <T> T
static <T> T
static <T> T
readValueAsMap
(byte[] content) readValueAsMap
(Reader src) readValueAsMap
(String content) static ObjectWriter
writer()
static void
writeValue
(OutputStream out, Object value) static void
writeValue
(Writer w, Object value) static byte[]
writeValueAsBytes
(Object value) static String
writeValueAsString
(Object value)
-
Method Details
-
reader
-
writer
-
prettyWriter
-
writeValueAsString
public static String writeValueAsString(Object value) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
writeValueAsBytes
public static byte[] writeValueAsBytes(Object value) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
writeValue
- Throws:
IOException
-
writeValue
- Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(String content, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(byte[] content, int offset, int len, Class<T> valueType) throws IOException - Throws:
IOException
-
readValue
public static <T> T readValue(byte[] content, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
public static <T> T readValue(byte[] content, int offset, int len, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(Reader src, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValue
- Throws:
IOException
-
readValue
public static <T> T readValue(InputStream src, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef) throws IOException - Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readValueAsMap
- Throws:
IOException
-
readTree
- Throws:
IOException
-
readTree
- Throws:
IOException
-
readTree
- Throws:
IOException
-
readTree
- Throws:
IOException
-