All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.jacksonjson.SpincastJsonManager.html Maven / Gradle / Ivy

The newest version!






SpincastJsonManager (org.spincast:spincast-framework 0.9.28 API)












org.spincast.plugins.jacksonjson

Class SpincastJsonManager

    • Method Detail

      • getGuice

        protected com.google.inject.Injector getGuice()
      • getJacksonPrettyPrinter

        protected com.fasterxml.jackson.core.util.DefaultPrettyPrinter getJacksonPrettyPrinter()
      • getJacksonPrettyPrinterNewline

        protected String getJacksonPrettyPrinterNewline()
      • getJacksonPrettyPrinterIndentation

        protected String getJacksonPrettyPrinterIndentation()
      • getIso8601DateParserDefault

        protected org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParserDefault()
      • getIso8601DateParser1

        protected org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser1()
      • getIso8601DateParser2

        protected org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser2()
      • getIso8601DateParser3

        protected org.spincast.shaded.org.apache.commons.lang3.time.FastDateFormat getIso8601DateParser3()
      • getObjectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
      • createObjectManager

        protected com.fasterxml.jackson.databind.ObjectMapper createObjectManager()
        Creates the ObjectMapper
      • configureObjectMapper

        protected void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Configuration of the ObjectMapper.
      • configureEmptyBeans

        protected void configureEmptyBeans(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      • configureMixins

        protected void configureMixins(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      • getJsonObjectSerializer

        protected com.fasterxml.jackson.databind.JsonSerializer<IJsonObject> getJsonObjectSerializer()
      • getJsonArraySerializer

        protected com.fasterxml.jackson.databind.JsonSerializer<IJsonArray> getJsonArraySerializer()
      • getDateSerializer

        protected com.fasterxml.jackson.databind.JsonSerializer<Date> getDateSerializer()
      • getJsonObjectDeserializer

        protected com.fasterxml.jackson.databind.JsonDeserializer<IJsonObject> getJsonObjectDeserializer()
      • getJsonArrayDeserializer

        protected com.fasterxml.jackson.databind.JsonDeserializer<IJsonArray> getJsonArrayDeserializer()
      • registerCustomModules

        protected void registerCustomModules(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      • registerIJsonObjectModule

        protected void registerIJsonObjectModule(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Register our custom (de)serializers for IJsonObject
      • registerDateModule

        protected void registerDateModule(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Register our custom serializers for dates.
      • toJsonString

        public String toJsonString(Object obj,
                                   boolean pretty)
        Description copied from interface: IJsonManager
        Gets the Json String representation of the specified object.
        Specified by:
        toJsonString in interface IJsonManager
        pretty - if true, the generated String will be formatted.
      • injectDependencies

        protected void injectDependencies(Object obj)
        Once the deserialization of an Object is done, we inject dependencies using Guice.
      • fromJsonString

        public <T> T fromJsonString(String jsonString,
                                    Class<T> clazz)
        Description copied from interface: IJsonManager
        Creates an instance of the specified T type from a Json String.
        Specified by:
        fromJsonString in interface IJsonManager
      • create

        public IJsonObject create(Map<String,?> params)
        Description copied from interface: IJsonManager
        Creates an empty JsonObject based on the specified Map. An attempt will be made to create a deep copy of every elements so a modification won't affect any external referecen and vice-versa.
        Specified by:
        create in interface IJsonManager
      • cloneJsonObject

        public IJsonObject cloneJsonObject(IJsonObject jsonObject)
        Description copied from interface: IJsonManager
        Deep copy of the IJsonObject, so any modification to the original won't affect the clone, and vice-versa.

        The resulting IJsonObject is mutable.

        Specified by:
        cloneJsonObject in interface IJsonManager
      • cloneJsonObject

        public IJsonObject cloneJsonObject(IJsonObject jsonObject,
                                           boolean mutable)
        Description copied from interface: IJsonManager
        Deep copy of the IJsonObject, so any modification to the original won't affect the clone, and vice-versa.
        Specified by:
        cloneJsonObject in interface IJsonManager
        mutable - if false, the resulting IJsonArray and all its children will be immutable.
      • cloneJsonArray

        public IJsonArray cloneJsonArray(IJsonArray jsonArray)
        Description copied from interface: IJsonManager
        Deep copy of the IJsonArray, so any modification to the original won't affect the clone, and vice-versa.

        The resulting IJsonArray is mutable.

        Specified by:
        cloneJsonArray in interface IJsonManager
      • cloneJsonArray

        public IJsonArray cloneJsonArray(IJsonArray jsonArray,
                                         boolean mutable)
        Description copied from interface: IJsonManager
        Deep copy of the IJsonArray, so any modification to the original won't affect the clone, and vice-versa.
        Specified by:
        cloneJsonArray in interface IJsonManager
        mutable - if false, the resulting IJsonArray and all its children will be immutable.
      • clone

        public Object clone(Object originalObject)
        Description copied from interface: IJsonManager
        Tries to clone an object to a IJsonObject or a IJsonArray, if the object is not of a primitive type (or BigDecimal).

        The cloning is made by serializing the Object to a Json string, and deserializing back. So any (de)serialization rules apply.

        The non primitive object will be cloned to a IJsonArray if it is a :

        • IJsonArray
        • Collection
        • Array

        Specified by:
        clone in interface IJsonManager
      • clone

        public Object clone(Object originalObject,
                            boolean mutable)
        Description copied from interface: IJsonManager
        Tries to clone an object to a IJsonObject or a IJsonArray, if the object is not of a primitive type (or BigDecimal).

        The cloning is made by serializing the Object to a Json string, and deserializing back. So any (de)serialization rules apply.

        The non primitive object will be cloned to a IJsonArray if it is a :

        • IJsonArray
        • Collection
        • Array

        Specified by:
        clone in interface IJsonManager
        mutable - if false, the resulting Object and all its potential children will be immutable.

Copyright © 2016. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy