Package net.minidev.json.writer
Class DefaultMapper<T>
- java.lang.Object
-
- net.minidev.json.writer.JsonReaderI<T>
-
- net.minidev.json.writer.DefaultMapper<T>
-
- Type Parameters:
T
-
public class DefaultMapper<T> extends JsonReaderI<T>
Simple Reader Class for generic Map- Author:
- uriel
-
-
Field Summary
-
Fields inherited from class net.minidev.json.writer.JsonReaderI
base
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultMapper(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.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 objectvoid
setValue(Object current, String key, Object value)
called when json-smart done parsing a valueJsonReaderI<JSONAwareEx>
startArray(String key)
called when json-smart parser start an array.JsonReaderI<JSONAwareEx>
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
-
DefaultMapper
protected DefaultMapper(JsonReader base)
-
-
Method Detail
-
startObject
public JsonReaderI<JSONAwareEx> startObject(String key)
Description copied from class:JsonReaderI
called when json-smart parser meet an object key- Overrides:
startObject
in classJsonReaderI<T>
- Parameters:
key
- key name
-
startArray
public JsonReaderI<JSONAwareEx> startArray(String key)
Description copied from class:JsonReaderI
called when json-smart parser start an array.- Overrides:
startArray
in classJsonReaderI<T>
- Parameters:
key
- the destination key name, or null.
-
createObject
public Object createObject()
Description copied from class:JsonReaderI
use to instantiate a new object that will be used as an object- Overrides:
createObject
in classJsonReaderI<T>
-
createArray
public Object createArray()
Description copied from class:JsonReaderI
use to instantiate a new object that will be used as an array- Overrides:
createArray
in classJsonReaderI<T>
-
setValue
public void setValue(Object current, String key, Object value)
Description copied from class:JsonReaderI
called when json-smart done parsing a value- Overrides:
setValue
in classJsonReaderI<T>
-
addValue
public void addValue(Object current, Object value)
Description copied from class:JsonReaderI
add a value in an array json object.- Overrides:
addValue
in classJsonReaderI<T>
-
-