JSON Parser Xojo plugin

EinhugurJSON.JSONArray Class (console safe)

A JSON array is an ordered collection of other JSON values.

JSONPrimitive
   JSONArray

class EinhugurJSON.JSONArray

Constructors

JSONArrayA constructor that takes no parameters.

Properties

BooleanValue (Inherited) Returns the value as Boolean from the primitive
CountReturns the number of elements in JSON array.
DoubleValue (Inherited) Returns the value as Double from the primitive
IntegerValue (Inherited) Returns the value as Integer (Int64) from the primitive
IsArray (Inherited) Returns true if the primitive contains Array.
IsBoolean (Inherited) Returns true if the primitive contains Boolean.
IsDouble (Inherited) Returns true if the primitive contains Double.
IsFalse (Inherited) Returns true if the primitive is false.
IsInteger (Inherited) Returns true if the primitive contains Integer value.
IsNull (Inherited) Returns true if the primitive contains null or nil.
IsNumber (Inherited) Returns true if the primitive contains number (can be Integer or Double)
IsObject (Inherited) Returns true if the primitive contains JSONObject (dictionary)
IsString (Inherited) Returns true if the primitive contains String.
IsTrue (Inherited) Returns true if the primitive is true.
NumberValue (Inherited) Returns the value as Double from the primitive, reading the value either from Integer or Double, not caring which one it is.
StringValue (Inherited) Returns the value as String from the primitive
Type (Inherited) Returns type code for the primitive. The type code can be any value from the JSONPrimitive.NodeTypeEnum.

Methods

AppendAppends JSONPrimitive value to the array.
AppendArrayAppends another JSONArray to the back of the Array.
AppendBooleanAppends Boolean value to the Array.
AppendDoubleAppends Double value to the Array.
AppendIntegerAppends Integer value to the Array.
AppendStringAppends String value to the Array.
BooleanValueByIndexReads or writes Boolean value in the array by index.
ClearClears all elements from the array.
Clone (Inherited) Makes a clone of the JSONPrimitive.
DoubleValueByIndexReads or writes Double value in the array by index.
GetSource (Inherited) Generates JSON string from the JSON object model. All parameters of this function are optional.
InsertInserts JSONPrimitive value into the array at given index.
InsertBooleanInserts Boolean value at given index in the array.
InsertDoubleInserts Double value at given index in the array.
InsertIntegerInserts Integer value at given index in the array.
InsertStringInserts String value at given index in the array.
IntegerValueByIndexReads or writes Integer (Int64) value in the array by index.
NumberToDoubleByIndexReads number in the array by index and forces it to Integer no matter if the actual field in the JSON was integer or double.
NumberToIntegerByIndexReads number in the array by index and forces it to Double no matter if the actual field in the JSON was integer or double.
Operator_Compare (Inherited) Comparison operator to compare two JSONPrimitives with the standard Xojo = operator.
Operator_SubscriptReads value from the array by index using standard array operator.
Operator_SubscriptWrites value to the array by index using standard array operator.
RemoveAtRemoves element from the array at given index.
StringValueByIndexReads or writes String value in the array by index.
ToVariant (Inherited) Attempts to convert the JSON structure to variant. Taking optional delegate to evaluate custom structures such as color and date which are not part of normal JSON standard.
WalkCalls the given delegate routine for each element in the array.

Delegates

WalkJSONArrayDelegate (console safe) A delegate for the Walk method on this class.

Supported Platforms:

  • macOS Intel 32 bit
  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit
  • iOS