Simple test struct:
```
class TAG_TestStruct : JsonApiStruct
{
float myArray[3];
void TAG_TestStruct()
{
RegV("myArray");
}
override void OnSuccess(int errorCode)
{
Print("Successfully expanded JSON");
}
override void OnError(int errorCode)
{
Print("Error expanding JSON: " + errorCode);
}
}
```
Code to deserialise using struct:
```
class TAG_RestCallback : RestCallback
{
ref TAG_TestStruct m_testStruct;
override void OnError(int errorCode)
{
Print("OnError()");
}
override void OnTimeout()
{
Print("OnTimeout()");
}
override void OnSuccess(string data, int dataSize)
{
m_testStruct = new TAG_TestStruct();
m_testStruct.ExpandFromRAW(data);
}
}
```
Data sent: {"myArray": [1, 2, 3]}
Error EJsonApiError.ETJSON_NOTARRAY event is raised, and the array is at default value {0,0,0} instead of {1,2,3}