Package jodd.json

Class JsonParserBase

java.lang.Object
jodd.json.JsonParserBase
Direct Known Subclasses:
JsonParser

public abstract class JsonParserBase extends Object
Just a base class of JsonParser that contains various utilities, to reduce the size of a parser.
  • Field Details

    • HASHMAP_SUPPLIER

      protected static final Supplier<Map> HASHMAP_SUPPLIER
    • LAZYMAP_SUPPLIER

      protected static final Supplier<Map> LAZYMAP_SUPPLIER
    • ARRAYLIST_SUPPLIER

      protected static final Supplier<List> ARRAYLIST_SUPPLIER
    • LAZYLIST_SUPPLIER

      protected static final Supplier<List> LAZYLIST_SUPPLIER
    • mapSupplier

      protected Supplier<Map> mapSupplier
    • listSupplier

      protected Supplier<List> listSupplier
    • classnameWhitelist

      protected List<String> classnameWhitelist
    • strictTypes

      protected boolean strictTypes
  • Constructor Details

    • JsonParserBase

      public JsonParserBase(boolean strictTypes)
  • Method Details

    • createMapToBean

      protected MapToBean createMapToBean(String classMetadataName)
      Creates new instance of MapToBean.
    • newArrayInstance

      protected Collection<Object> newArrayInstance(Class targetType)
      Creates new type for JSON array objects. It returns a collection. Later, the collection will be converted into the target type.
    • newObjectInstance

      protected Object newObjectInstance(Class targetType)
      Creates new object or a HashMap if type is not specified.
    • injectValueIntoObject

      protected void injectValueIntoObject(Object target, jodd.introspector.PropertyDescriptor pd, Object value)
      Injects value into the targets property.
    • convertType

      protected Object convertType(Object value, Class targetType)
      Converts type of the given value.