Hi there,
I have the following problem.
I'm trying to download the data via the Shopware API, convert it to JSON and then display it in a list view.
Unfortunately I can only get 1000 items using JsonConvert.DeserializeObject.
ArtikelC.AJson A = JsonConvert.DeserializeObject(responseFromServer, jsonSettings);
for(int i = 0; i < A.data.Count; i++)
{
ListViewItem lvi = new ListViewItem();
lvi.Text = A.data[i].id.ToString();
lvi.SubItems.Add(A.data[i].mainDetail.ToString().Split(new string[] { "," },
StringSplitOptions.None)[3].Replace("\"", "").Replace("number: ", ""));
lvi.SubItems.Add(A.data[i].name);
listView1.Items.Add(lvi);
}
Response-Length: 4.382.212
data.Count (JSON): 1000
Total Count API: 48.074
I hope someone can help me with this Problem :)
Classes:
public class clsAData
{
public int id { get; set; }
public int mainDetailId { get; set; }
public int supplierId { get; set; }
public int taxId { get; set; }
public int priceGroupId { get; set; }
public int filterGroupId { get; set; }
public int configuratorSetId { get; set; }
public string name { get; set; }
public string description { get; set; }
public string descriptionLong { get; set; }
public DateTime added { get; set; }
public bool active { get; set; }
public int pseudoSales { get; set; }
public bool highlight { get; set; }
public string keywords { get; set; }
public string metaTitle { get; set; }
public DateTime changed { get; set; }
public bool priceGroupActive { get; set; }
public bool lastStock { get; set; }
public bool crossBundleLook { get; set; }
public bool notification { get; set; }
public string template { get; set; }
public int mode { get; set; }
public DateTime availableFrom { get; set; }
public DateTime availableTo { get; set; }
public object mainDetail { get; set; }
public object tax { get; set; }
public object propertyValue { get; set; }
public object supplier { get; set; }
public object propertyGroup { get; set; }
public object[] customerGroups { get; set; }
public object[] images { get; set; }
public object configuratorSet { get; set; }
public object[] links { get; set; }
public object[] downloads { get; set; }
public object[] categories { get; set; }
public object[] similar { get; set; }
public object[] related { get; set; }
public object[] details { get; set; }
public object[] translations { get; set; }
}
public class AJson
{
[JsonProperty("data")]
public List data { get; set; }
[JsonProperty("total")]
public int total { get; set; }
}
What I have tried:
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647"/>
</webServices>
</scripting>
</system.web.extensions>