Unable to cast object of type ‘Newtonsoft.Json.Linq.JObject’ to type ‘Newtonsoft.Json.Linq.JArray’

Just make a class and deserialize it.

public class Print
{
    public int PrintId { get; set; }
    public string Header { get; set; }
    public string TC { get; set; }
    public string CompanyRef { get; set; }
}

Print printObj = JsonConvert.DeserializeObject<Print>(yourJson);
printObj.PrintId = //...

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)