Class JacksonUtil


  • public class JacksonUtil
    extends Object
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • Method Detail

      • getObjectMapper

        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
      • getXmlMapper

        public com.fasterxml.jackson.dataformat.xml.XmlMapper getXmlMapper()
      • loadObject

        public <T> T loadObject​(String jsonData,
                                Class<T> clazz)
      • loadXml

        public <T> T loadXml​(String xmlData,
                             Class<T> clazz)
      • loadList

        public <T> List<T> loadList​(String jsonData,
                                    Class<T> clazz)
      • loadAsList

        public <T> List<T> loadAsList​(String jsonData,
                                      Class<T> clazz)
      • getJsonString

        public String getJsonString​(Object object)
      • getIndentedJsonString

        public String getIndentedJsonString​(Object object)
      • getXmlString

        public String getXmlString​(Object object)
      • writeXml

        public void writeXml​(Object object,
                             Writer writer)
      • 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)
      • addProperty

        public void addProperty​(com.fasterxml.jackson.databind.node.ObjectNode objectNode,
                                String property,
                                String value,
                                String altValue)