Class FakeMapper

java.lang.Object
net.minidev.json.writer.JsonReaderI<Object>
net.minidev.json.writer.FakeMapper

public class FakeMapper extends JsonReaderI<Object>
  • Field Details

  • Method Details

    • startObject

      public JsonReaderI<?> startObject(String key)
      Description copied from class: JsonReaderI
      called when json-smart parser meet an object key
      Overrides:
      startObject in class JsonReaderI<Object>
      Parameters:
      key - key name
      Returns:
      a JsonReaderI to handle the object parsing
    • startArray

      public JsonReaderI<?> startArray(String key)
      Description copied from class: JsonReaderI
      called when json-smart parser start an array.
      Overrides:
      startArray in class JsonReaderI<Object>
      Parameters:
      key - the destination key name, or null.
      Returns:
      a JsonReaderI to handle the array parsing
    • setValue

      public void setValue(Object current, String key, Object value)
      Description copied from class: JsonReaderI
      called when json-smart done parsing a value
      Overrides:
      setValue in class JsonReaderI<Object>
      Parameters:
      current - the current object being built
      key - the key for the value
      value - the parsed value
    • addValue

      public void addValue(Object current, Object value)
      Description copied from class: JsonReaderI
      add a value in an array json object.
      Overrides:
      addValue in class JsonReaderI<Object>
      Parameters:
      current - the current array object
      value - the value to add
    • createObject

      public Object createObject()
      Description copied from class: JsonReaderI
      use to instantiate a new object that will be used as an object
      Overrides:
      createObject in class JsonReaderI<Object>
      Returns:
      a new object instance
    • createArray

      public Object createArray()
      Description copied from class: JsonReaderI
      use to instantiate a new object that will be used as an array
      Overrides:
      createArray in class JsonReaderI<Object>
      Returns:
      a new array instance