c# (UNITY) Получение данных из Json

Пытаюсь получить данные из Json для дальнейшего использования.

Почему это не работает? Уже пол дня не могу понять.

c#

public class ItemsIni : MonoBehaviour
{
    void Start()
    {
        InitializeItems();
    }

    void InitializeItems()
    {
        Init initItems = JsonUtility.FromJson<Init>(System.IO.File.ReadAllText(Application.streamingAssetsPath + "/Languages/ru_RU.json"));
        Debug.Log(initItems.food.Apple.itemDescription.ToString());
    }
}

public class Item
{
    public int itemId { get; set; }
    public string itemName { get; set; }
    public string itemDescription { get; set; }
    public string itemType { get; set; }
}

public class Food
{
    public Item Apple { get; set; }
    public Item Plum { get; set; }
}

public class Init
{
    public Food food { get; set; }
}

Json

{
 "Food": {
   "Apple": {
     "itemId": 0,
     "itemName": "Yabloko",
     "itemDescription": "Sladkoe",
     "itemType": "Eda"
   },
   "Plum": {
     "itemId": 1,
     "itemName": "Sliva",
     "itemDescription": "Kislaya",
     "itemType": "Eda"
   }
  }
 }

Unity error:

NullReferenceException: Object reference not set to an instance of an object
ItemsIni.InitItems () (at Assets/GameScripts/ItemsIni.cs:15)
ItemsIni.Start () (at Assets/GameScripts/ItemsIni.cs:9)

Ответы (0 шт):