I want to create a dictionary like from the JSON code below:
{
"0": {
"NAME": "Stick",
"TEXTURE": "stick.png",
"AMOUNT": "16",
"DESCRIPTION": "Веточка... похоже дерева, с которого она упала, уже нет"
},
"1": {
"NAME": "Wood",
"TEXTURE": "wood.png",
"AMOUNT": "32",
"DESCRIPTION": "Материал для небольших построек. Хорошо горит"
},
"2": {
"NAME": "Stone",
"TEXTURE": "stone.png",
"AMOUNT": "32",
"DESCRIPTION": "Небольшой камень. Возможно из него можно много чего сделать"
}
}
However, I don’t fully understand the “syntax” of dictionaries. I tried to do the same as with JSON file, however it didn’t work. help
Have not tested it though, but it should be something like that i think - whether or not its best practice i have no idea. But it should get the work done.
With that structure tho a array wrapping a dictionary is prob. better than double dictionaries.