Package net.minidev.json.writer
Class CompessorMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Booleanprivate JSONStyleprivate booleanprivate booleanprivate booleanprivate AppendableFields 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 TypeMethodDescriptionprivate voidaddComma()voidadd a value in an array json object.private voidAllow a mapper to converte a temprary 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 objectprivate booleanisArray()private booleanisCompressor(Object obj) private booleanisObject()private voidvoidcalled when json-smart done parsing a valueJsonReaderI<?> startArray(String key) called when json-smart parser start an array.private voidJsonReaderI<?> startObject(String key) called when json-smart parser meet an object keyprivate voidwriteValue(Object value) Methods inherited from class net.minidev.json.writer.JsonReaderI
getType, getValue
-
Field Details
-
out
-
compression
-
_isObj
-
needSep
private boolean needSep -
isOpen
private boolean isOpen -
isClosed
private boolean isClosed
-
-
Constructor Details
-
CompessorMapper
-
CompessorMapper
-
-
Method Details
-
isArray
private boolean isArray() -
isObject
private boolean isObject() -
isCompressor
-
startObject
Description copied from class:JsonReaderIcalled when json-smart parser meet an object key- Overrides:
startObjectin classJsonReaderI<CompessorMapper>- Throws:
IOException
-
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.- Throws:
IOException
-
startKey
- Throws:
IOException
-
setValue
Description copied from class:JsonReaderIcalled when json-smart done parsing a value- Overrides:
setValuein classJsonReaderI<CompessorMapper>- Throws:
IOException
-
addValue
Description copied from class:JsonReaderIadd a value in an array json object.- Overrides:
addValuein classJsonReaderI<CompessorMapper>- Throws:
IOException
-
addComma
- Throws:
IOException
-
writeValue
- Throws:
IOException
-
createObject
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an object- Overrides:
createObjectin classJsonReaderI<CompessorMapper>
-
createArray
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an array- Overrides:
createArrayin classJsonReaderI<CompessorMapper>
-
convert
Description copied from class:JsonReaderIAllow a mapper to converte a temprary structure to the final data format. example: convert an Listto an int[] - Overrides:
convertin classJsonReaderI<CompessorMapper>
-
close
- Throws:
IOException
-
open
- Throws:
IOException
-