public class JsonManager<T> extends Object
| Constructor and Description |
|---|
JsonManager(Class<T> theClass)
Create a new JsonManager
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMixin(Class target,
Class mixin)
Add an additional mixin for serialization with this object mapper.
|
T |
read(com.fasterxml.jackson.databind.JsonNode asJson) |
T |
read(com.fasterxml.jackson.core.JsonParser p) |
T |
read(String s) |
String |
write(Collection<T> c)
Convert a collection of objects to their JSON representation.
|
String |
write(Map<String,T> map) |
String |
write(Object o) |
String |
writePretty(Object o) |
public void addMixin(Class target, Class mixin)
public String write(Object o) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic String writePretty(Object o) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic String write(Collection<T> c) throws com.fasterxml.jackson.core.JsonProcessingException
c - the collectioncom.fasterxml.jackson.core.JsonProcessingExceptionpublic String write(Map<String,T> map) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic T read(String s) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionpublic T read(com.fasterxml.jackson.core.JsonParser p) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionpublic T read(com.fasterxml.jackson.databind.JsonNode asJson)
Copyright © 2019. All rights reserved.