Class JsonObject

    • Field Detail

      • m_nVersion

        protected int m_nVersion
        The version of the type this JsonObject represents.
    • Constructor Detail

      • JsonObject

        public JsonObject()
        Construct a JsonObject.
      • JsonObject

        public JsonObject​(Map<String,​?> map)
        Construct a JsonObject with the same mappings as the given map.
        Parameters:
        map - the map whose mappings are to be placed in this JsonObject.
    • Method Detail

      • getString

        public String getString​(String name)
        Obtain a string value.
        Parameters:
        name - the key of the value
        Returns:
        the string value for the given key
      • getBoolean

        public boolean getBoolean​(String name)
        Obtain a boolean value.
        Parameters:
        name - the key of the value
        Returns:
        the boolean value for the given key
      • getNumber

        public Number getNumber​(String name)
        Obtain a Number value.
        Parameters:
        name - the key of the value
        Returns:
        the Number value for the given key
      • getByte

        public byte getByte​(String name)
        Obtain a byte value.
        Parameters:
        name - the key of the value
        Returns:
        the byte value for the given key
      • getShort

        public short getShort​(String name)
        Obtain a short value.
        Parameters:
        name - the key of the value
        Returns:
        the short value for the given key
      • getInt

        public int getInt​(String name)
        Obtain a int value.
        Parameters:
        name - the key of the value
        Returns:
        the int value for the given key
      • getLong

        public long getLong​(String name)
        Obtain a long value.
        Parameters:
        name - the key of the value
        Returns:
        the long value for the given key
      • getFloat

        public float getFloat​(String name)
        Obtain a float value.
        Parameters:
        name - the key of the value
        Returns:
        the float value for the given key
      • getDouble

        public double getDouble​(String name)
        Obtain a double value.
        Parameters:
        name - the key of the value
        Returns:
        the double value for the given key
      • getBigInteger

        public BigInteger getBigInteger​(String name)
        Obtain a BigInteger value.
        Parameters:
        name - the key of the value
        Returns:
        the BigInteger value for the given key
      • getBigDecimal

        public BigDecimal getBigDecimal​(String name)
        Obtain a BigDecimal value.
        Parameters:
        name - the key of the value
        Returns:
        the BigDecimal value for the given key
      • set

        public JsonObject set​(String name,
                              Object value)
        Set the value for the given key.
        Parameters:
        name - the key of te value to set
        value - the value to set
        Returns:
        this JsonObject
      • getClassName

        public String getClassName()
        Returns the class name.
        Returns:
        the class name
      • setClassName

        public void setClassName​(String className)
        Sets the class name.
        Parameters:
        className - the class name
      • isVersioned

        public boolean isVersioned()
        Returns true if the associated type is versioned.
        Returns:
        true if the associated type is versioned
      • getVersion

        public int getVersion()
        Returns the version of the associated type.
        Returns:
        the version of this type or 0 to indicate there is no version
      • setVersion

        public JsonObject setVersion​(int version)
        Set the version of this object.
        Parameters:
        version - the version
        Returns:
        this JsonObject
      • readExternal

        public void readExternal​(ObjectInput in)
                          throws IOException
        Initialize this object from the data in the passed ObjectInput stream.
        Specified by:
        readExternal in interface Externalizable
        Parameters:
        in - the stream to read data from in order to restore the object
        Throws:
        IOException - if an I/O exception occurs