I am making a rhythm game and need help on making my JSON file into a list.
The JSON files look something like this:
{
"bar": "Bar_1",
"positiony": "1",
"positionx": "Left"
},
{
"bar": "Bar_1",
"positiony": "2",
"positionx": "Down"
}
]}```
How would I go about turning this into a list?
In general I highly suggest staying away from Unity’s JSON “tiny lite” package. It’s really not very capable at all and will silently fail on very common data structures, such as Dictionaries and Hashes and ALL properties.
Instead grab Newtonsoft JSON .NET off the asset store for free, or else install it from the Unity Package Manager (Window → Package Manager).
PS: for folks howling about how NewtonSoft JSON .NET will “add too much size” to your game, JSON .NET is like 307k in size, and it has the important advantage that it actually works the way you expect a JSON serializer to work in the year 2021.