Returns a JSON Entity's type.

Syntax

Type = SRP_Json(Handle, "Type")

Returns

The JSON entity's type.

Parameters

ParameterDescription
HandleHandle 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")
  • No labels