Package net.minidev.json.writer
Class CompessorMapper
- java.lang.Object
-
- net.minidev.json.writer.JsonReaderI<CompessorMapper>
-
- net.minidev.json.writer.CompessorMapper
-
public class CompessorMapper extends JsonReaderI<CompessorMapper>
-
-
Field Summary
-
Fields inherited from class net.minidev.json.writer.JsonReaderI
base
-
-
Constructor Summary
Constructors Constructor Description CompessorMapper(JsonReader base, Appendable out, JSONStyle compression)CompessorMapper(JsonReader base, Appendable out, JSONStyle compression, Boolean isObj)
-
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.CompessorMapperconvert(Object current)Allow a mapper to convert a temporary structure to the final data format.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<?>startArray(String key)called when json-smart parser start an array.JsonReaderI<?>startObject(String key)called when json-smart parser meet an object key-
Methods inherited from class net.minidev.json.writer.JsonReaderI
getType, getValue
-
-
-
-
Constructor Detail
-
CompessorMapper
public CompessorMapper(JsonReader base, Appendable out, JSONStyle compression)
-
CompessorMapper
public CompessorMapper(JsonReader base, Appendable out, JSONStyle compression, Boolean isObj)
-
-
Method Detail
-
startObject
public JsonReaderI<?> startObject(String key) throws IOException
Description copied from class:JsonReaderIcalled when json-smart parser meet an object key- Overrides:
startObjectin classJsonReaderI<CompessorMapper>- Parameters:
key- key name- Throws:
IOException
-
startArray
public JsonReaderI<?> startArray(String key) throws IOException
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
-
setValue
public void setValue(Object current, String key, Object value) throws IOException
Description copied from class:JsonReaderIcalled when json-smart done parsing a value- Overrides:
setValuein classJsonReaderI<CompessorMapper>- Throws:
IOException
-
addValue
public void addValue(Object current, Object value) throws IOException
Description copied from class:JsonReaderIadd a value in an array json object.- Overrides:
addValuein classJsonReaderI<CompessorMapper>- Throws:
IOException
-
createObject
public Object createObject()
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an object- Overrides:
createObjectin classJsonReaderI<CompessorMapper>
-
createArray
public Object createArray()
Description copied from class:JsonReaderIuse to instantiate a new object that will be used as an array- Overrides:
createArrayin classJsonReaderI<CompessorMapper>
-
convert
public CompessorMapper convert(Object current)
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>
-
-