Package com.couchbase.client.core.utils
Class DefaultObjectMapper
java.lang.Object
com.couchbase.client.core.utils.DefaultObjectMapper
@Public @Uncommitted public class DefaultObjectMapper extends Object
Provides global access to the services of a Jackson
ObjectMapper
with default configuration.- Since:
- 1.6.0
-
Method Summary
Modifier and Type Method Description static ObjectWriter
prettyWriter()
static ObjectReader
reader()
static JsonNode
readTree(byte[] content)
static JsonNode
readTree(InputStream src)
static JsonNode
readTree(Reader src)
static JsonNode
readTree(String content)
static <T> T
readValue(byte[] content, int offset, int len, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
static <T> T
readValue(byte[] content, int offset, int len, Class<T> valueType)
static <T> T
readValue(byte[] content, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
static <T> T
readValue(byte[] content, Class<T> valueType)
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
readValue(Reader src, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
static <T> T
readValue(Reader src, Class<T> valueType)
static <T> T
readValue(String content, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
static <T> T
readValue(String content, Class<T> valueType)
static Map<String,Object>
readValueAsMap(byte[] content)
static Map<String,Object>
readValueAsMap(InputStream src)
static Map<String,Object>
readValueAsMap(Reader src)
static Map<String,Object>
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
-