Trying to read the map of strings and following data structure:
typedef map<string, ref TheFollowingDataStructure> TFDSMap; class TheFollowingDataStructure { int SomeId; int SomeColor; ref TStringArray SomeSArray; void TheFollowingDataStructure() { SomeId = 0; SomeColor = 0xDEADBEEF; SomeSArray = new TStringArray; SomeSArray.Insert("I dont feel quite well, Mr. rVn"); } }
When I'm saving it using JsonFileLoader<TFDSMap>.JsonSaveFile with one element, it seems fine, file contents:
{ "TheFirstItem": { "SomeId": 0, "SomeColor": -559038737, "SomeSArray": [ "I dont feel quite well, Mr. rVn" ] } }
But! When we're trying to read this file using JsonFileLoader<TFDSMap>.JsonLoadFile, it throws this:
JSON ERROR: Reading variable: data Expecting map Expecting instance Reading variable: SomeId Expecting key Cannot convert key to int Function: 'Error' Stack trace: scripts/1_Core/proto\endebug.c:44 scripts/3_Game/tools\jsonfileloader.c:29 ...
Why on earth would it expect a key there? I dunno. But the result is pretty obvious, no data is getting back :c