C#C
C#8mo ago
Fumetsu

✅ Newtonsoft.Json JsonSerializationException

As the title says, I keep getting a JsonSerializationException. I have no idea how to view the Exception details so if anyone could tell me that'd be nice. I've followed a few tutorials on this topic, but absolutely none have worked. Two exceptions occur in System.Private.CoreLib.dll and one in Newstonesoft.Json.dll

private async Task LoadData()
 {
 var clientJson = System.IO.File.ReadAllText(clientDataPath);
 Classes.Spark.DebugLog(clientJson);
 var clientData = JsonConvert.DeserializeObject<ClientData(clientJson);
}

public class ClientData
{
    public string Client_ID { get; set; }
    public string Client_Secret {  get; set; }

    public string Refresh_Token { get; set; }
    public string Access_Token { get; set; }
}
Was this page helpful?