Search code examples
c#unity-game-enginesimplejson

How to load data.json file - unity


I have data in .json file.

My json contains data like this,

enter image description here

I am looking for ways to parse it in c#. Hope everybody help please


Solution

  • Two options:

    1. JsonUtility make a c# class structure that mirrors the json data and call JsonUtility.FromJson
    2. using Newtonsoft.Json; you can deserialize it without creating a helper structure with JsonConvert.Deserialize