Davil
Davil

Reputation: 11

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

Upvotes: 0

Views: 3142

Answers (1)

Ben Peterson
Ben Peterson

Reputation: 106

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

Upvotes: 2

Related Questions