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 protectedDefaultMapper(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.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<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:JsonReaderIcalled when json-smart parser meet an object key- Overrides:
startObjectin classJsonReaderI<T>- Parameters:
key- key name
-
startArray
public JsonReaderI<JSONAwareEx> 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>
-
-