Package net.minidev.json.writer
Class JsonReaderI<T>
- java.lang.Object
-
- net.minidev.json.writer.JsonReaderI<T>
-
- Type Parameters:
T
- result type
- Direct Known Subclasses:
ArraysMapper
,BeansMapper
,BeansMapper.Bean
,BeansMapper.BeanNoConv
,CollectionMapper.ListClass
,CollectionMapper.ListType
,CollectionMapper.MapClass
,CollectionMapper.MapType
,CompessorMapper
,DefaultMapper
,DefaultMapperCollection
,DefaultMapperOrdered
,FakeMapper
,MapperRemapped
,UpdaterMapper
public abstract class JsonReaderI<T> extends Object
Default datatype mapper use by Json-smart ton store data.- Author:
- uriel Chemouni
-
-
Field Summary
Fields Modifier and Type Field Description JsonReader
base
-
Constructor Summary
Constructors Constructor Description JsonReaderI(JsonReader base)
Reader can be link to the JsonReader Base
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(Object current, Object value)
add a value in an array json object.T
convert(Object current)
Allow a mapper to convert a temporary structure to the final data format.Object
createArray()
use to instantiate a new object that will be used as an arrayObject
createObject()
use to instantiate a new object that will be used as an objectType
getType(String key)
Object
getValue(Object current, String key)
-------------void
setValue(Object current, String key, Object value)
called when json-smart done parsing a valueJsonReaderI<?>
startArray(String key)
called when json-smart parser start an array.JsonReaderI<?>
startObject(String key)
called when json-smart parser meet an object key
-
-
-
Field Detail
-
base
public final JsonReader base
-
-
Constructor Detail
-
JsonReaderI
public JsonReaderI(JsonReader base)
Reader can be link to the JsonReader Base- Parameters:
base
- parent reader
-
-
Method Detail
-
startObject
public JsonReaderI<?> startObject(String key) throws ParseException, IOException
called when json-smart parser meet an object key- Parameters:
key
- key name- Throws:
ParseException
IOException
-
startArray
public JsonReaderI<?> startArray(String key) throws ParseException, IOException
called when json-smart parser start an array.- Parameters:
key
- the destination key name, or null.- Throws:
ParseException
IOException
-
setValue
public void setValue(Object current, String key, Object value) throws ParseException, IOException
called when json-smart done parsing a value- Throws:
ParseException
IOException
-
addValue
public void addValue(Object current, Object value) throws ParseException, IOException
add a value in an array json object.- Throws:
ParseException
IOException
-
createObject
public Object createObject()
use to instantiate a new object that will be used as an object
-
createArray
public Object createArray()
use to instantiate a new object that will be used as an array
-
-