array<int> intArray = {42, 1337}; Print(intArray); array<array<int>> intArrayArray = {intArray}; Print(intArrayArray); ContainerSerializationSaveContext writer(); JsonSaveContainer jsonContainer = new JsonSaveContainer(); jsonContainer.SetMaxDecimalPlaces(5); writer.SetContainer(jsonContainer); writer.WriteValue("", intArrayArray); auto res = jsonContainer.ExportToString(); Print(res);
If I let him write array<array<int>> instead of array<ref array<int>> as you "normally" do it crashes with an access violation. I have my reason why the data array itself does not keep the reference. The inner array is held alive somewhere else to make my API more convenient to use.