Package net.minidev.json.writer
Class DefaultMapperCollection<T>
- java.lang.Object
-
- net.minidev.json.writer.JsonReaderI<T>
-
- net.minidev.json.writer.DefaultMapperCollection<T>
-
public class DefaultMapperCollection<T> extends JsonReaderI<T>
-
-
Field Summary
-
Fields inherited from class net.minidev.json.writer.JsonReaderI
base
-
-
Constructor Summary
Constructors Constructor Description DefaultMapperCollection(JsonReader base, Class<T> clz)
-
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.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 objectvoidsetValue(Object current, String key, Object value)called when json-smart done parsing a valueJsonReaderI<T>startArray(String key)called when json-smart parser start an array.JsonReaderI<T>startObject(String key)called when json-smart parser meet an object key-
Methods inherited from class net.minidev.json.writer.JsonReaderI
convert, getType, getValue
-
-
-
-
Constructor Detail
-
DefaultMapperCollection
public DefaultMapperCollection(JsonReader base, Class<T> clz)
-
-
Method Detail
-
startObject
public JsonReaderI<T> startObject(String key)
Description copied from class:JsonReaderIcalled when json-smart parser meet an object key- Overrides:
startObjectin classJsonReaderI<T>- Parameters:
key- key name
-
startArray
public JsonReaderI<T> startArray(String key)
Description copied from class:JsonReaderIcalled when json-smart parser start an array.- Overrides:
startArrayin classJsonReaderI<T>- Parameters:
key- the destination key name, or null.
-
createObject
public Object createObject()
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an object- Overrides:
createObjectin classJsonReaderI<T>
-
createArray
public Object createArray()
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an array- Overrides:
createArrayin classJsonReaderI<T>
-
setValue
public void setValue(Object current, String key, Object value)
Description copied from class:JsonReaderIcalled when json-smart done parsing a value- Overrides:
setValuein classJsonReaderI<T>
-
addValue
public void addValue(Object current, Object value)
Description copied from class:JsonReaderIadd a value in an array json object.- Overrides:
addValuein classJsonReaderI<T>
-
-