Package net.minidev.json.writer
Class JsonReaderI<T>
- java.lang.Object
-
- net.minidev.json.writer.JsonReaderI<T>
-
- Type Parameters:
T
-
- 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 java.lang.Object
Default datatype mapper use by Json-smart ton store data.
-
-
Field Summary
Fields Modifier and Type Field Description JsonReader
base
private static java.lang.String
ERR_MSG
-
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(java.lang.Object current, java.lang.Object value)
add a value in an array json object.T
convert(java.lang.Object current)
Allow a mapper to converte a temprary structure to the final data format.java.lang.Object
createArray()
use to instantiate a new object that will be used as an arrayjava.lang.Object
createObject()
use to instantiate a new object that will be used as an objectjava.lang.reflect.Type
getType(java.lang.String key)
java.lang.Object
getValue(java.lang.Object current, java.lang.String key)
-------------void
setValue(java.lang.Object current, java.lang.String key, java.lang.Object value)
called when json-smart done parsing a valueJsonReaderI<?>
startArray(java.lang.String key)
called when json-smart parser start an array.JsonReaderI<?>
startObject(java.lang.String key)
called when json-smart parser meet an object key
-
-
-
Field Detail
-
base
public final JsonReader base
-
ERR_MSG
private static java.lang.String ERR_MSG
-
-
Constructor Detail
-
JsonReaderI
public JsonReaderI(JsonReader base)
Reader can be link to the JsonReader Base- Parameters:
base
-
-
-
Method Detail
-
startObject
public JsonReaderI<?> startObject(java.lang.String key) throws ParseException, java.io.IOException
called when json-smart parser meet an object key- Throws:
ParseException
java.io.IOException
-
startArray
public JsonReaderI<?> startArray(java.lang.String key) throws ParseException, java.io.IOException
called when json-smart parser start an array.- Parameters:
key
- the destination key name, or null.- Throws:
ParseException
java.io.IOException
-
setValue
public void setValue(java.lang.Object current, java.lang.String key, java.lang.Object value) throws ParseException, java.io.IOException
called when json-smart done parsing a value- Throws:
ParseException
java.io.IOException
-
getValue
public java.lang.Object getValue(java.lang.Object current, java.lang.String key)
-------------
-
getType
public java.lang.reflect.Type getType(java.lang.String key)
-
addValue
public void addValue(java.lang.Object current, java.lang.Object value) throws ParseException, java.io.IOException
add a value in an array json object.- Throws:
ParseException
java.io.IOException
-
createObject
public java.lang.Object createObject()
use to instantiate a new object that will be used as an object
-
createArray
public java.lang.Object createArray()
use to instantiate a new object that will be used as an array
-
convert
public T convert(java.lang.Object current)
Allow a mapper to converte a temprary structure to the final data format. example: convert an Listto an int[]
-
-