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 JsonReaderbase
-
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 voidaddValue(Object current, Object value)add a value in an array json object.Tconvert(Object current)Allow a mapper to convert a temporary structure to the final data format.ObjectcreateArray()use to instantiate a new object that will be used as an arrayObjectcreateObject()use to instantiate a new object that will be used as an objectTypegetType(String key)ObjectgetValue(Object current, String key)-------------voidsetValue(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:
ParseExceptionIOException
-
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:
ParseExceptionIOException
-
setValue
public void setValue(Object current, String key, Object value) throws ParseException, IOException
called when json-smart done parsing a value- Throws:
ParseExceptionIOException
-
addValue
public void addValue(Object current, Object value) throws ParseException, IOException
add a value in an array json object.- Throws:
ParseExceptionIOException
-
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
-
-