Package net.minidev.json.writer
Class CompessorMapper
-
Field Summary
Fields inherited from class net.minidev.json.writer.JsonReaderI
base -
Constructor Summary
ConstructorsConstructorDescriptionCompessorMapper(JsonReader base, Appendable out, JSONStyle compression) CompessorMapper(JsonReader base, Appendable out, JSONStyle compression, Boolean isObj) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a value in an array json object.Allow a mapper to convert a temporary structure to the final data format.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 valueJsonReaderI<?>startArray(String key) called when json-smart parser start an array.JsonReaderI<?>startObject(String key) called when json-smart parser meet an object keyMethods inherited from class net.minidev.json.writer.JsonReaderI
getType, getValue
-
Constructor Details
-
CompessorMapper
-
CompessorMapper
-
-
Method Details
-
startObject
Description copied from class:JsonReaderIcalled when json-smart parser meet an object key- Overrides:
startObjectin classJsonReaderI<CompessorMapper>- Parameters:
key- key name- Returns:
- a JsonReaderI to handle the object parsing
- Throws:
IOException- if I/O error occurs
-
startArray
Description copied from class:JsonReaderIcalled when json-smart parser start an array.- Overrides:
startArrayin classJsonReaderI<CompessorMapper>- Parameters:
key- the destination key name, or null.- Returns:
- a JsonReaderI to handle the array parsing
- Throws:
IOException- if I/O error occurs
-
setValue
Description copied from class:JsonReaderIcalled when json-smart done parsing a value- Overrides:
setValuein classJsonReaderI<CompessorMapper>- Parameters:
current- the current object being builtkey- the key for the valuevalue- the parsed value- Throws:
IOException- if I/O error occurs
-
addValue
Description copied from class:JsonReaderIadd a value in an array json object.- Overrides:
addValuein classJsonReaderI<CompessorMapper>- Parameters:
current- the current array objectvalue- the value to add- Throws:
IOException- if I/O error occurs
-
createObject
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an object- Overrides:
createObjectin classJsonReaderI<CompessorMapper>- 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<CompessorMapper>- Returns:
- a new array instance
-
convert
Description copied from class:JsonReaderIAllow a mapper to convert a temporary structure to the final data format.example: convert an List<Integer> to an int[]
- Overrides:
convertin classJsonReaderI<CompessorMapper>- Parameters:
current- the current object to convert- Returns:
- the converted object
-