I am developing an android app in xamarin.forms many of times my app stop working and show this message. i don't get it what is this?
_**My Json Looks like: **_
[{"id":15,"name":"Complete Winter Skincare Pack","description":"
- Upto 35% Off at Caffeine Carnival
- Complimentary Face Care Shots, with all orders
- Complimentary Body & Face Care Shots, on orders 799+
","maincategoryid":"3","categoryid":"13","subcategoryid":"6","finalprice":2104.0},{"id":14,"name":"SkinKraft- India Only Customized Skincare For Every Skin Issue.","description":"
Product Regimen Trusted By 3,00,000+ Indians For Their Skin Type & Issue
- Cleanses skin while maintaining the pH balance of the skin
- Repairs and nourishes the skin barrier, making it stronger
- Potent ingredients to address specific skin issues
","maincategoryid":"3","categoryid":"13","subcategoryid":"6","finalprice":989.0},{"id":13,"name":"Home Care Service","description":"The home care service market was valued atThe home care service market was valued at","maincategoryid":"3","categoryid":"12","subcategoryid":"5","finalprice":3000.0}]
My code in c# is :
var content = "";
HttpClient client = new HttpClient();
var RestURL = UserSettings.api + "/api/McProducts/GetMcProducts?maincategoryid=2";
client.BaseAddress = new Uri(RestURL);
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = await client.GetAsync(RestURL);
content = await response.Content.ReadAsStringAsync();
List Items = JsonConvert.DeserializeObject<List>(content);
foreach (Products c in Items)
{
string product_name = c.name.ToString().ToUpper();
int prod_length = Convert.ToInt32(product_name.Length);
if (prod_length > 30)
{
prod_length = 29;
}
product_name = product_name.Substring(0, prod_length - 1);
string price = "₹ " + c.finalprice + "/-";
source5.Add(new Products
{
image = UserSettings.software_url + "/productImages/image2/" + c.id + ".jpg",
name = product_name,
id = c.id,
finalprice = price
});
}
cvcategory2.ItemsSource = source5;
Please give some suggestion.