Hi. I’m sending json to storage via WriteStorageObjectAsync. But when this json is uploaded it has incorrect lines order.
It is important because I’m using typed objects parced in json.
For example I sending this json
{
"IsInteractive": true,
"OpenLevel": 0,
"IsEmmpty": false,
"CellItem": {
"$type": "Funcraft.Merge.CellItem, GameModel",
"Id": 20,
"IsVisible": true,
"Attributes": [
{
"$type": "Funcraft.Merge.Draggable, GameModel"
},
{
"$type": "Funcraft.Merge.Mergable, GameModel",
"Level": 3
},
{
"$type": "Funcraft.Merge.Chest, GameModel",
"_dropStep": 0,
"IsOpened": false
},
{
"$type": "Funcraft.Merge.StorehouseItem, GameModel"
}
]
},
"Column": -25,
"Row": 0,
"Position": {
"x": -25,
"y": 0,
"z": 0,
"magnitude": 25.0,
"sqrMagnitude": 625
}
but really uploaded json looks like
{
"Row": 0,
"Column": -25,
"IsBusy": false,
"CellItem": {
"Id": 20,
"$type": "Funcraft.Merge.CellItem, GameModel",
"IsVisible": true,
"Attributes": [
{
"$type": "Funcraft.Merge.Chest, GameModel",
"IsOpened": false,
"_dropStep": 0
},
{
"$type": "Funcraft.Merge.StorehouseItem, GameModel"
},
{
"$type": "Funcraft.Merge.Draggable, GameModel"
},
{
"$type": "Funcraft.Merge.Mergable, GameModel",
"Level": 3
}
]
},
"IsEmmpty": false,
"IsLocked": false,
"Position": {
"x": -25,
"y": 0,
"z": 0,
"magnitude": 25,
"sqrMagnitude": 625
},
"OpenLevel": 0,
"IsInteractive": true
}
Line with $type must be on the first place, otherwise object will not be deserialized