Class JacksonUtil
- java.lang.Object
-
- net.sf.jasperreports.jackson.util.JacksonUtil
-
public class JacksonUtil extends Object
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JacksonUtil(JasperReportsContext jasperReportsContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(com.fasterxml.jackson.databind.node.ObjectNode objectNode, String property, String value)
void
addProperty(com.fasterxml.jackson.databind.node.ObjectNode objectNode, String property, String value, String altValue)
String
getIndentedJsonString(Object object)
static JacksonUtil
getInstance(JasperReportsContext jasperReportsContext)
String
getJsonString(Object object)
com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
com.fasterxml.jackson.dataformat.xml.XmlMapper
getXmlMapper()
String
getXmlString(Object object)
com.fasterxml.jackson.databind.node.ObjectNode
hyperlinkToJsonObject(JRPrintHyperlink hyperlink)
<T> List<T>
loadAsList(String jsonData, Class<T> clazz)
<T> List<T>
loadList(String jsonData, Class<T> clazz)
<T> T
loadObject(String jsonData, Class<T> clazz)
<T> T
loadXml(InputStream is, Class<T> clazz)
<T> T
loadXml(String xmlData, Class<T> clazz)
void
writeXml(Object object, Writer writer)
-
-
-
Constructor Detail
-
JacksonUtil
protected JacksonUtil(JasperReportsContext jasperReportsContext)
-
-
Method Detail
-
getInstance
public static JacksonUtil getInstance(JasperReportsContext jasperReportsContext)
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
getXmlMapper
public com.fasterxml.jackson.dataformat.xml.XmlMapper getXmlMapper()
-
loadXml
public <T> T loadXml(InputStream is, Class<T> clazz)
-
hyperlinkToJsonObject
public com.fasterxml.jackson.databind.node.ObjectNode hyperlinkToJsonObject(JRPrintHyperlink hyperlink)
-
addProperty
public void addProperty(com.fasterxml.jackson.databind.node.ObjectNode objectNode, String property, String value)
-
-