Help me with this json code please

I’m getting a " JSON must represent an object type." error at Line 14. I still couldn’t figure out what’s wrong.

public class JsonDemo : MonoBehaviour
{
    string path;
    string jsonString;

    private void Start()
    {
        path = Application.streamingAssetsPath + "/Creature.json";
        jsonString = File.ReadAllText(path);
        print(path);


        print(jsonString);
        Creature Yumo = JsonUtility.FromJson<Creature>(jsonString);
        Debug.Log(Yumo);

        //Yumo.Level = 25;
        //string newYumo = JsonUtility.ToJson(Yumo);
        //Debug.Log(newYumo);
    }
}

[System.Serializable]
public class Creature
{
    public string Name;
    public int Level;
    public int[] Stats;  
}

and json is

{
    "Name" :"Yumo",
    "Level":"7",
    "Stats":[4,7]
}

Thanks but it didn’t change anything for me. There isn’t a much difference with the tutorial and the code above i think.

The problem was with the json file. I deleted and recreated it and it fixed it.

That’s interesting, I’m glad you got it working.