java.lang.Object
org.exoplatform.ws.frameworks.json.value.JsonValue
org.exoplatform.ws.frameworks.json.value.impl.ObjectValue

public class ObjectValue extends JsonValue
Version:
$Id: ObjectValue.java 34417 2009-07-23 14:42:56Z dkatayev $
Author:
Andrey Parfonov
  • Constructor Details

    • ObjectValue

      public ObjectValue()
  • Method Details

    • addElement

      public void addElement(String key, JsonValue child)
      Add child value. This method must be used if isObject() gives true.
      Overrides:
      addElement in class JsonValue
      Parameters:
      key - the key.
      child - the child value.
    • isObject

      public boolean isObject()
      Overrides:
      isObject in class JsonValue
      Returns:
      true if value is 'object', false otherwise. Should be overridden.
    • getKeys

      public Iterator<String> getKeys()
      Get all keys for access values.
      Overrides:
      getKeys in class JsonValue
      Returns:
      Iterator.
    • getElement

      public JsonValue getElement(String key)
      Get value by key.
      Overrides:
      getElement in class JsonValue
      Parameters:
      key - the key.
      Returns:
      JsonVAlue with specified key.
    • toString

      public String toString()
      Specified by:
      toString in class JsonValue
    • writeTo

      public void writeTo(JsonWriter writer) throws JsonException
      Write value in given writer.
      Specified by:
      writeTo in class JsonValue
      Parameters:
      writer - Writer.
      Throws:
      JsonException - if any errors occurs.