Returns a JSON Entity's type.
Syntax
Type = SRP_Json(Handle, "TYPE")
Returns
The JSON entity's type.
Parameters
Parameter | Description |
---|---|
Handle | Handle to a JSON Entity. Required. |
Remarks
The TYPE service returns a JSON entity's type. The type will be one of five values: "Array", "Boolean", "Number", "Object", or "String".
Example
// Create a bunch of entities SRP_JSON(ObjectHandle, "NEW", "OBJECT") SRP_JSON(IntegerHandle, "NEW", "NUMBER", "1234567890") SRP_JSON(DecimalHandle, "NEW", "NUMBER", "123456789.987654321") SRP_JSON(StringHandle, "NEW", "STRING", "Hello, World!") SRP_JSON(BooleanHandle, "NEW", "BOOLEAN", 1) SRP_JSON(ArrayHandle, "NEW", "ARRAY") // Look at their types Type = SRP_JSON(ObjectHandle, "TYPE") ; // "Object" Type = SRP_JSON(IntegerHandle, "TYPE") ; // "Number" Type = SRP_JSON(DecimalHandle, "TYPE") ; // "Number" Type = SRP_JSON(StringHandle, "TYPE") ; // "String" Type = SRP_JSON(BooleanHandle, "TYPE") ; // "Boolean" Type = SRP_JSON(ArrayHandle, "TYPE") ; // "Array" // Remember to clean up SRP_JSON(ArrayHandle, "RELEASE") SRP_JSON(BooleanHandle, "RELEASE") SRP_JSON(StringHandle, "RELEASE") SRP_JSON(DecimalHandle, "RELEASE") SRP_JSON(IntegerHandle, "RELEASE") SRP_JSON(ObjectHandle, "RELEASE")