Class JsonValueJNI
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.util.JsonValueJNI
-
public final class JsonValueJNI extends Object
The type Json value jni.
-
-
Constructor Summary
Constructors Constructor Description JsonValueJNI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanasBoolean(SafeHandle parserHandle, int item)As boolean.static floatasFloat(SafeHandle parserHandle, int item)As float.static longasInt(SafeHandle parserHandle, int item)As int.static StringasJson(SafeHandle parser, int item)As json string.static StringasString(SafeHandle parserHandle, int item)As string.static intcount(SafeHandle parser, int item)Count int.static JsonValuecreateParser(String json)Create parser json value.static StringgetName(SafeHandle parserHandle, int item, int index, String key)Gets the name/key of the pair.static JsonValuegetValue(SafeHandle parserHandle, int item, int index, String key)Gets value.static booleanhasValue(SafeHandle parserHandle, int item, int index, String key)Has value.
-
-
-
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 handleitem- the item- Returns:
- the string value
-
asInt
public static long asInt(SafeHandle parserHandle, int item)
As int.- Parameters:
parserHandle- the parser handleitem- the item- Returns:
- the long value
-
asFloat
public static float asFloat(SafeHandle parserHandle, int item)
As float.- Parameters:
parserHandle- the parser handleitem- the item- Returns:
- the float value
-
asBoolean
public static boolean asBoolean(SafeHandle parserHandle, int item)
As boolean.- Parameters:
parserHandle- the parser handleitem- 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 handleitem- the itemindex- the indexkey- 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 handleitem- the itemindex- the indexkey- 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 handleitem- the itemindex- the indexkey- the key- Returns:
- the boolean value
-
count
public static final int count(SafeHandle parser, int item)
Count int.- Parameters:
parser- the parseritem- the item- Returns:
- the count
-
asJson
public static final String asJson(SafeHandle parser, int item)
As json string.- Parameters:
parser- the parseritem- the item- Returns:
- the string
-
-