net.minidev.json.mapper
Class CompessorMapper

java.lang.Object
  extended by net.minidev.json.mapper.AMapper<CompessorMapper>
      extended by net.minidev.json.mapper.CompessorMapper

public class CompessorMapper
extends AMapper<CompessorMapper>


Constructor Summary
CompessorMapper(Appendable out, JSONStyle compression)
           
CompessorMapper(Appendable out, JSONStyle compression, Boolean isObj)
           
 
Method Summary
 void addValue(Object current, Object value)
          add a value in an array json object.
 CompessorMapper convert(Object current)
          Allow a mapper to converte a temprary structure to the final data format.
 Object createArray()
          use to instantiate a new object that will be used as an array
 Object createObject()
          use to instantiate a new object that will be used as an object
 void setValue(Object current, String key, Object value)
          called when json-smart done parssing a value
 AMapper<?> startArray(String key)
          called when json-smart parser start an array.
 AMapper<?> startObject(String key)
          called when json-smart parser meet an object key
 
Methods inherited from class net.minidev.json.mapper.AMapper
getType, getValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompessorMapper

public CompessorMapper(Appendable out,
                       JSONStyle compression)

CompessorMapper

public CompessorMapper(Appendable out,
                       JSONStyle compression,
                       Boolean isObj)
Method Detail

startObject

public AMapper<?> startObject(String key)
                       throws IOException
Description copied from class: AMapper
called when json-smart parser meet an object key

Overrides:
startObject in class AMapper<CompessorMapper>
Throws:
IOException

startArray

public AMapper<?> startArray(String key)
                      throws IOException
Description copied from class: AMapper
called when json-smart parser start an array.

Overrides:
startArray in class AMapper<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: AMapper
called when json-smart done parssing a value

Overrides:
setValue in class AMapper<CompessorMapper>
Throws:
IOException

addValue

public void addValue(Object current,
                     Object value)
              throws IOException
Description copied from class: AMapper
add a value in an array json object.

Overrides:
addValue in class AMapper<CompessorMapper>
Throws:
IOException

createObject

public Object createObject()
Description copied from class: AMapper
use to instantiate a new object that will be used as an object

Overrides:
createObject in class AMapper<CompessorMapper>

createArray

public Object createArray()
Description copied from class: AMapper
use to instantiate a new object that will be used as an array

Overrides:
createArray in class AMapper<CompessorMapper>

convert

public CompessorMapper convert(Object current)
Description copied from class: AMapper
Allow a mapper to converte a temprary structure to the final data format. example: convert an List to an int[]

Overrides:
convert in class AMapper<CompessorMapper>


Copyright © 2012 Chemouni Uriel. All Rights Reserved.