Package jodd.json
Class JsonParserBase
- java.lang.Object
-
- jodd.json.JsonParserBase
-
- Direct Known Subclasses:
JsonParser
public abstract class JsonParserBase extends java.lang.ObjectJust a base class ofJsonParserthat contains various utilities, to reduce the size of a parser.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.function.Supplier<java.util.List>ARRAYLIST_SUPPLIERprotected java.util.List<java.lang.String>classnameWhitelistprotected static java.util.function.Supplier<java.util.Map>HASHMAP_SUPPLIERprotected static java.util.function.Supplier<java.util.List>LAZYLIST_SUPPLIERprotected static java.util.function.Supplier<java.util.Map>LAZYMAP_SUPPLIERprotected java.util.function.Supplier<java.util.List>listSupplierprotected java.util.function.Supplier<java.util.Map>mapSupplierprotected booleanstrictTypes
-
Constructor Summary
Constructors Constructor Description JsonParserBase(boolean strictTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectconvertType(java.lang.Object value, java.lang.Class targetType)Converts type of the given value.protected MapToBeancreateMapToBean(java.lang.String classMetadataName)Creates new instance ofMapToBean.protected voidinjectValueIntoObject(java.lang.Object target, jodd.introspector.PropertyDescriptor pd, java.lang.Object value)Injects value into the targets property.protected java.util.Collection<java.lang.Object>newArrayInstance(java.lang.Class targetType)Creates new type for JSON array objects.protected java.lang.ObjectnewObjectInstance(java.lang.Class targetType)Creates new object or aHashMapif type is not specified.
-
-
-
Field Detail
-
HASHMAP_SUPPLIER
protected static final java.util.function.Supplier<java.util.Map> HASHMAP_SUPPLIER
-
LAZYMAP_SUPPLIER
protected static final java.util.function.Supplier<java.util.Map> LAZYMAP_SUPPLIER
-
ARRAYLIST_SUPPLIER
protected static final java.util.function.Supplier<java.util.List> ARRAYLIST_SUPPLIER
-
LAZYLIST_SUPPLIER
protected static final java.util.function.Supplier<java.util.List> LAZYLIST_SUPPLIER
-
mapSupplier
protected java.util.function.Supplier<java.util.Map> mapSupplier
-
listSupplier
protected java.util.function.Supplier<java.util.List> listSupplier
-
classnameWhitelist
protected java.util.List<java.lang.String> classnameWhitelist
-
strictTypes
protected boolean strictTypes
-
-
Method Detail
-
createMapToBean
protected MapToBean createMapToBean(java.lang.String classMetadataName)
Creates new instance ofMapToBean.
-
newArrayInstance
protected java.util.Collection<java.lang.Object> newArrayInstance(java.lang.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 java.lang.Object newObjectInstance(java.lang.Class targetType)
Creates new object or aHashMapif type is not specified.
-
injectValueIntoObject
protected void injectValueIntoObject(java.lang.Object target, jodd.introspector.PropertyDescriptor pd, java.lang.Object value)Injects value into the targets property.
-
convertType
protected java.lang.Object convertType(java.lang.Object value, java.lang.Class targetType)Converts type of the given value.
-
-