Class JsonValueJNI


  • public final class JsonValueJNI
    extends Object
    The type Json value jni.
    • Constructor Detail

      • JsonValueJNI

        public JsonValueJNI()
    • Method Detail

      • createParser

        public static JsonValue createParser​(String json)
        Create parser json value.
        Parameters:
        json - the json
        Returns:
        the JsonValue object
      • asString

        public static String asString​(SafeHandle parserHandle,
                                      int item)
        As string.
        Parameters:
        parserHandle - the parser handle
        item - the item
        Returns:
        the string value
      • asInt

        public static long asInt​(SafeHandle parserHandle,
                                 int item)
        As int.
        Parameters:
        parserHandle - the parser handle
        item - the item
        Returns:
        the long value
      • asFloat

        public static float asFloat​(SafeHandle parserHandle,
                                    int item)
        As float.
        Parameters:
        parserHandle - the parser handle
        item - the item
        Returns:
        the float value
      • asBoolean

        public static boolean asBoolean​(SafeHandle parserHandle,
                                        int item)
        As boolean.
        Parameters:
        parserHandle - the parser handle
        item - the item
        Returns:
        the boolean value
      • getValue

        public static JsonValue getValue​(SafeHandle parserHandle,
                                         int item,
                                         int index,
                                         String key)
        Gets value.
        Parameters:
        parserHandle - the parser handle
        item - the item
        index - the index
        key - the key
        Returns:
        the value
      • getName

        public static String getName​(SafeHandle parserHandle,
                                     int item,
                                     int index,
                                     String key)
        Gets the name/key of the pair.
        Parameters:
        parserHandle - the parser handle
        item - the item
        index - the index
        key - the key
        Returns:
        String the name/key of the pair.
      • hasValue

        public static boolean hasValue​(SafeHandle parserHandle,
                                       int item,
                                       int index,
                                       String key)
        Has value.
        Parameters:
        parserHandle - the parser handle
        item - the item
        index - the index
        key - the key
        Returns:
        the boolean value
      • count

        public static final int count​(SafeHandle parser,
                                      int item)
        Count int.
        Parameters:
        parser - the parser
        item - the item
        Returns:
        the count
      • asJson

        public static final String asJson​(SafeHandle parser,
                                          int item)
        As json string.
        Parameters:
        parser - the parser
        item - the item
        Returns:
        the string