Class JsonBuilderJNI
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.util.JsonBuilderJNI
-
public final class JsonBuilderJNI extends Object
The type Json builder jni.
-
-
Constructor Summary
Constructors Constructor Description JsonBuilderJNI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intaddItem(SafeHandle builderHandle, int item, int index, String find)Adds an item to the specified ajv itemstatic StringasJsonCopy(SafeHandle builder, int item)As json string.static JsonBuildercreateBuilder()Create builder json value.static intsetItem(SafeHandle builderHandle, int item, String json, com.microsoft.cognitiveservices.speech.util.JsonValueJNI.ValueKind kind, String str, boolean boolValue, int integer, double number)Adds an item to the specified ajv item
-
-
-
Method Detail
-
createBuilder
public static JsonBuilder createBuilder()
Create builder json value.- Returns:
- the JsonBuilder object
-
addItem
public static int addItem(SafeHandle builderHandle, int item, int index, String find)
Adds an item to the specified ajv item- Parameters:
builderHandle- the parser handleitem- the specified ajv item to add toindex- the index to add the new item atfind- the json key to associate with the new item- Returns:
- the ajv item added
-
setItem
public static int setItem(SafeHandle builderHandle, int item, String json, com.microsoft.cognitiveservices.speech.util.JsonValueJNI.ValueKind kind, String str, boolean boolValue, int integer, double number)
Adds an item to the specified ajv item- Parameters:
builderHandle- the parser handleitem- the specified ajv item to add tojson- the json string to be used if kind = JSONkind- the kind of value being addedstr- the string value to be used if kind = STRINGboolValue- the boolean value to be used if kind = BOOLEANinteger- the integer value to be used if kind = NUMBERnumber- the doubl value to be used if kind = NUMBER- Returns:
- An HR result indicating error or success
-
asJsonCopy
public static String asJsonCopy(SafeHandle builder, int item)
As json string.- Parameters:
builder- the builderitem- the item- Returns:
- the string
-
-