Load json into array class

I’m trying to load data from a json file into an array class but have hit the wall in how it should be done, so hope that someone here can give me a hint on what I have been doing wrong with the code on how to load the data into the array - this line is in error: PlayerDialogues = JsonUtility.FromJson(jsonFile.text);

public class Initializer : MonoBehaviour
{
public TextAsset jsonFile;
public Dialogues PlayerDialogues;

private void Awake()
{
    PlayerDialogues = new Dialogues[30];
    PlayerDialogues = JsonUtility.FromJson<Dialogues>(jsonFile.text);
}

[System.Serializable]
public class Dialogues
{
    public int Weight; 
    public int Level;
    [TextArea]
    public string Text;
}

}

After some digging around I found a solution by using this script below and did a “quick” fix to the existing json because it is exported from a winforms app that uses Newtonsoft that does (apparently) not export with the “{ “playerDialogues”:” infront of the json file. So when I need to load the json file I do this fix:

 public TextAsset jsonFile; public Dialogues[] PlayerDialogues;

 private void Awake()
 {
      string str = "{\"Character\":" + jsonFile.text + "}";
      PlayerDialogues = JsonHelper.FromJson<Dialogues>(str);
 }

public static class JsonHelper
{
public static T FromJson(string json)
{
Wrapper wrapper = JsonUtility.FromJson<Wrapper>(json);
return wrapper.Character;
}

public static string ToJson<T>(T[] array)
{
    Wrapper<T> wrapper = new Wrapper<T>();
    wrapper.Character = array;
    return JsonUtility.ToJson(wrapper);
}

public static string ToJson<T>(T[] array, bool prettyPrint)
{
    Wrapper<T> wrapper = new Wrapper<T>();
    wrapper.Character = array;
    return JsonUtility.ToJson(wrapper, prettyPrint);
}

[System.Serializable]
private class Wrapper<T>
{
    public T[] Character;
}

}