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- the type of object to map
Simple Reader Class for generic Map
- Author:
- uriel
-
Field Summary
Fields inherited from class net.minidev.json.writer.JsonReaderI
base -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a value in an array json object.use to instantiate a new object that will be used as an arrayuse to instantiate a new object that will be used as an objectvoidcalled when json-smart done parsing a valuestartArray(String key) called when json-smart parser start an array.startObject(String key) called when json-smart parser meet an object keyMethods inherited from class net.minidev.json.writer.JsonReaderI
convert, getType, getValue
-
Constructor Details
-
DefaultMapper
-
-
Method Details
-
startObject
Description copied from class:JsonReaderIcalled when json-smart parser meet an object key- Overrides:
startObjectin classJsonReaderI<T>- Parameters:
key- key name- Returns:
- a JsonReaderI to handle the object parsing
-
startArray
Description copied from class:JsonReaderIcalled when json-smart parser start an array.- Overrides:
startArrayin classJsonReaderI<T>- Parameters:
key- the destination key name, or null.- Returns:
- a JsonReaderI to handle the array parsing
-
createObject
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an object- Overrides:
createObjectin classJsonReaderI<T>- Returns:
- a new object instance
-
createArray
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an array- Overrides:
createArrayin classJsonReaderI<T>- Returns:
- a new array instance
-
setValue
Description copied from class:JsonReaderIcalled when json-smart done parsing a value- Overrides:
setValuein classJsonReaderI<T>- Parameters:
current- the current object being builtkey- the key for the valuevalue- the parsed value
-
addValue
Description copied from class:JsonReaderIadd a value in an array json object.- Overrides:
addValuein classJsonReaderI<T>- Parameters:
current- the current array objectvalue- the value to add
-