Package net.minidev.json.writer
Class CompessorMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Boolean
private JSONStyle
private boolean
private boolean
private boolean
private Appendable
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 TypeMethodDescriptionprivate void
addComma()
void
add a value in an array json object.private void
Allow 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 boolean
isArray()
private boolean
isCompressor
(Object obj) private boolean
isObject()
private void
void
called when json-smart done parsing a valueJsonReaderI
<?> startArray
(String key) called when json-smart parser start an array.private void
JsonReaderI
<?> startObject
(String key) called when json-smart parser meet an object keyprivate void
writeValue
(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:JsonReaderI
called when json-smart parser meet an object key- Overrides:
startObject
in classJsonReaderI<CompessorMapper>
- Throws:
IOException
-
startArray
Description copied from class:JsonReaderI
called when json-smart parser start an array.- Overrides:
startArray
in classJsonReaderI<CompessorMapper>
- Parameters:
key
- the destination key name, or null.- Throws:
IOException
-
startKey
- Throws:
IOException
-
setValue
Description copied from class:JsonReaderI
called when json-smart done parsing a value- Overrides:
setValue
in classJsonReaderI<CompessorMapper>
- Throws:
IOException
-
addValue
Description copied from class:JsonReaderI
add a value in an array json object.- Overrides:
addValue
in classJsonReaderI<CompessorMapper>
- Throws:
IOException
-
addComma
- Throws:
IOException
-
writeValue
- Throws:
IOException
-
createObject
Description copied from class:JsonReaderI
use to instantiate a new object that will be used as an object- Overrides:
createObject
in classJsonReaderI<CompessorMapper>
-
createArray
Description copied from class:JsonReaderI
use to instantiate a new object that will be used as an array- Overrides:
createArray
in classJsonReaderI<CompessorMapper>
-
convert
Description copied from class:JsonReaderI
Allow a mapper to converte a temprary structure to the final data format. example: convert an Listto an int[] - Overrides:
convert
in classJsonReaderI<CompessorMapper>
-
close
- Throws:
IOException
-
open
- Throws:
IOException
-