@Deprecated public final class JsonTransformer extends Object
JsonTransformer helps to transform json string to objects and back.| Constructor and Description |
|---|
JsonTransformer()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Deprecated.
use instead the same name method in class
ObjectMapperFactory Note: will be removed on next minor release |
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper(boolean newMapper)
Deprecated.
use instead the same name method in class
ObjectMapperFactory Note: will be removed on next minor release |
static <T> String |
toJson(List<T> list)
Deprecated.
use instead the same name method in class
ObjectToJsonExtensions Note: will be removed on next minor release |
static <T> String |
toJson(T object)
Deprecated.
use instead the same name method in class
ObjectToJsonExtensions Note: will be removed on next minor release |
static <T> String |
toJson(T object,
boolean newMapper)
Deprecated.
use instead the same name method in class
ObjectToJsonExtensions Note: will be removed on next minor release |
static <T> String |
toJsonQuietly(T object)
Deprecated.
use instead the same name method in class
ObjectToJsonQuietlyExtensions
Note: will be removed on next minor release |
static <T> T |
toObject(String jsonString,
Class<T> clazz)
Deprecated.
use instead the same name method in class
JsonToObjectExtensions Note: will be removed on next minor release |
static <T> T |
toObject(String jsonString,
Class<T> clazz,
boolean newMapper)
Deprecated.
use instead the same name method in class
JsonToObjectExtensions Note: will be removed on next minor release |
static <T> T |
toObject(String jsonString,
Class<T> clazz,
com.fasterxml.jackson.databind.Module... modules)
Deprecated.
use instead the same name method in class
JsonToObjectExtensions Note: will be removed on next minor release |
static <T> List<T> |
toObjectList(String jsonString,
Class<T> clazz)
Deprecated.
use instead the same name method in class
JsonToObjectExtensions Note: will be removed on next minor release |
static String |
toXml(String jsonString)
Deprecated.
use instead the same name method in class
JsonToXmlExtensions Note: will be removed on next minor release |
static <T> String |
toXml(String jsonString,
Class<T> clazz)
Deprecated.
use instead the same name method in class
JsonToXmlExtensions Note: will be removed on next minor release |
@Deprecated public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
ObjectMapperFactory @Deprecated public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper(boolean newMapper)
ObjectMapperFactory newMapper - flag that indicates if a new ObjectMapper should be created. if true a new
ObjectMapper will be created otherwise the ObjectMapper from this class will be
returned.@Deprecated public static <T> String toJson(List<T> list) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException
ObjectToJsonExtensions List to a json string.T - the generic typelist - the listcom.fasterxml.jackson.core.JsonGenerationException - If an error occurs by writing json stringcom.fasterxml.jackson.databind.JsonMappingException - the If an error occurs when mapping the string into ObjectIOException - Signals that an I/O exception has occurred.@Deprecated public static <T> String toJson(T object) throws com.fasterxml.jackson.core.JsonProcessingException
ObjectToJsonExtensions T - the generic type of the given argumentobject - the object.com.fasterxml.jackson.core.JsonProcessingException - If an error occurs when converting object to String@Deprecated public static <T> String toJson(T object, boolean newMapper) throws com.fasterxml.jackson.core.JsonProcessingException
ObjectToJsonExtensions T - the generic typeobject - the objectnewMapper - flag that indicates if a new ObjectMapper should be created. if true a new
ObjectMapper will be created otherwise the ObjectMapper from this class will be
returned.com.fasterxml.jackson.core.JsonProcessingException - If an error occurs when converting object to String@Deprecated public static <T> String toJsonQuietly(T object)
ObjectToJsonQuietlyExtensions
T - the generic type of the given argumentobject - the object.@Deprecated public static <T> T toObject(String jsonString, Class<T> clazz) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
JsonToObjectExtensions T - the generic type of the return typejsonString - the json stringclazz - the clazz of the generic typecom.fasterxml.jackson.core.JsonParseException - If an error occurs when parsing the string into Objectcom.fasterxml.jackson.databind.JsonMappingException - the If an error occurs when mapping the string into ObjectIOException - Signals that an I/O exception has occurred.@Deprecated public static <T> T toObject(String jsonString, Class<T> clazz, boolean newMapper) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
JsonToObjectExtensions T - the generic type of the return typejsonString - the json stringclazz - the clazz of the generic typenewMapper - flag that indicates if a new ObjectMapper should be created. if true a new
ObjectMapper will be created otherwise the ObjectMapper from this class will be
returned.com.fasterxml.jackson.core.JsonParseException - If an error occurs when parsing the string into Objectcom.fasterxml.jackson.databind.JsonMappingException - the If an error occurs when mapping the string into ObjectIOException - Signals that an I/O exception has occurred.@Deprecated public static <T> T toObject(String jsonString, Class<T> clazz, com.fasterxml.jackson.databind.Module... modules) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
JsonToObjectExtensions T - the generic type of the return typejsonString - the json stringclazz - the clazz of the generic typemodules - The modules to register for the mappercom.fasterxml.jackson.core.JsonParseException - If an error occurs when parsing the string into Objectcom.fasterxml.jackson.databind.JsonMappingException - the If an error occurs when mapping the string into ObjectIOException - Signals that an I/O exception has occurred.@Deprecated public static <T> List<T> toObjectList(String jsonString, Class<T> clazz) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
JsonToObjectExtensions T - the generic type of the return typejsonString - the json stringclazz - the clazz of the generic typecom.fasterxml.jackson.core.JsonParseException - If an error occurs when parsing the string into Objectcom.fasterxml.jackson.databind.JsonMappingException - the If an error occurs when mapping the string into ObjectIOException - Signals that an I/O exception has occurred.@Deprecated public static String toXml(String jsonString) throws org.json.JSONException
JsonToXmlExtensions @Deprecated public static <T> String toXml(String jsonString, Class<T> clazz) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
JsonToXmlExtensions T - the generic typejsonString - the json as String objectclazz - the clazz of the generic typeString objectcom.fasterxml.jackson.core.JsonParseException - If an error occurs when parsing the string into Objectcom.fasterxml.jackson.databind.JsonMappingException - the If an error occurs when mapping the string into ObjectIOException - Signals that an I/O exception has occurred.Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.