Class JsonValue

    • Constructor Detail

      • JsonValue

        public JsonValue​(int item,
                         SafeHandle handle)
        Instantiates a new Json value.
        Parameters:
        item - the item
        handle - the handle
    • Method Detail

      • Parse

        public static JsonValue Parse​(String json)
        Parse json value.
        Parameters:
        json - the json string
        Returns:
        the json value
      • asString

        public String asString()
        As string.
        Returns:
        the string value
      • asInt

        public long asInt()
        As int.
        Returns:
        the long value
      • asFloat

        public float asFloat()
        As float.
        Returns:
        the float value
      • asBoolean

        public boolean asBoolean()
        As boolean.
        Returns:
        the boolean value
      • asJson

        public String asJson()
        As json string.
        Returns:
        the json string value
      • get

        public JsonValue get​(String key)
        Get json value.
        Parameters:
        key - the key
        Returns:
        the json value
      • get

        public JsonValue get​(int index)
        Get json value.
        Parameters:
        index - the index
        Returns:
        the json value
      • getName

        public String getName​(int index)
        Get the name of the value.
        Parameters:
        index - The index to get the name of.
        Returns:
        String representing the name of the value if any.
      • hasValue

        public boolean hasValue​(int index)
        Has value.
        Parameters:
        index - the index
        Returns:
        the boolean value
      • hasValue

        public boolean hasValue​(String key)
        Has value.
        Parameters:
        key - the key
        Returns:
        the boolean value
      • count

        public int count()
        Count int.
        Returns:
        the int