Skip to main content
A struct defines the kinds of data and the functionality their objects will have. This data structure enables you to create your own custom types by grouping together variables of other types and methods.

Methods

compare

If a struct has a function with this exact signature, then this method will be used to compare two instances of the struct when sorting an array of struct instances.
Example:

fromJsonString

Pass a boolean value to copy into a new object.
Example:

fromXMLNode

Populates a struct from an XMLNode.
Example:

toJson

Populates a JSONBuilder from a struct.
Example:

toJsonString

This function will return a JSON formatted string of the struct’s contents. Same functionality as toJson(JSONBuilder), but it will return a string directly without having to instantiate a JSONbuilder.
Example:

toString

This function will return a JSON formatted string of the struct’s contents. Same functionality as toJson(JSONBuilder), but it will return a string directly without having to instantiate a JSONbuilder.
Example: