I want to De-serialize the following array
[
{
"customer": {
"id": 1,
"group_id": 3,
"group_name": "customer",
"customer_group_id": 1,
"customer_group_name": "General",
"name": "Walk-in Customer",
"company": "Walk-in Customer",
"vat_no": "",
"address": "Customer Address",
"city": "",
"state": "",
"postal_code": ,
"country": "India",
"phone": 123456789,
"email": "",
"cf1": "",
"cf2": "",
"cf3": "",
"cf4": "",
"cf5": "",
"cf6": "",
"invoice_footer": null,
"payment_term": 0,
"logo": "logo.png",
"award_points": 0,
"deposit_amount": null,
"price_group_id": null,
"price_group_name": null,
"account_name": "",
"opbal": 0,
"opbal_type": "Dr",
"cheque_printing_name": "",
"print_name": "",
"bank_name": "",
"party_type": "",
"group_account": "",
"bank_account_number": "",
"gst_no": "",
"birthday_on": "0000-00-00",
"aniversary_no": "0000-00-00"
},
"payments": false,
"biller": {
"id": 3,
"group_id": null,
"group_name": "biller",
"customer_group_id": null,
"customer_group_name": null,
"name": "Garden Art",
"company": "",
"vat_no": "",
"address": "",
"city": "",
"state": "",
"postal_code": ,
"country": "",
"phone": ,
"email": "",
"cf1": "",
"cf2": "",
"cf3": "",
"cf4": "",
"cf5": "",
"cf6": "",
"invoice_footer": " Thank you for shopping with us. Please come again",
"payment_term": 0,
"logo": "",
"award_points": 0,
"deposit_amount": null,
"price_group_id": null,
"price_group_name": null,
"account_name": "",
"opbal": "",
"opbal_type": "",
"cheque_printing_name": "",
"print_name": "",
"bank_name": "",
"party_type": "",
"group_account": "",
"bank_account_number": "",
"gst_no": "",
"birthday_on": "0000-00-00",
"aniversary_no": "0000-00-00"
},
"user": {
"id": 1,
"last_ip_address": "::1",
"ip_address": "\u0000\u0000",
"username": "",
"password": "",
"salt": null,
"email": "",
"activation_code": null,
"forgotten_password_code": null,
"forgotten_password_time": null,
"remember_code": "",
"created_on": ,
"last_login": ,
"active": 1,
"first_name": "",
"last_name": "",
"company": "",
"phone": "",
"avatar": null,
"gender": "female",
"group_id": 1,
"warehouse_id": null,
"biller_id": null,
"company_id": null,
"show_cost": 0,
"show_price": 0,
"award_points": 0,
"view_right": 0,
"edit_right": 0,
"allow_discount": 0
},
"inv": {
"id": 744,
"date": "2019-03-02 21:32:00",
"reference_no": "",
"customer_id": 1,
"customer": "Walk-in Customer",
"biller_id": 3,
"biller": "",
"warehouse_id": 3,
"note": "",
"staff_note": "",
"total": 30,
"product_discount": 0,
"order_discount_id": "",
"total_discount": 0,
"order_discount": 0,
"product_tax": 5.4,
"order_tax_id": 3,
"order_tax": 2.124,
"total_tax": 7.524,
"shipping": 0,
"grand_total": 37.524,
"sale_status": "completed",
"payment_status": "pending",
"payment_term": 0,
"due_date": null,
"created_by": 1,
"updated_by": null,
"updated_at": null,
"total_items": 2,
"pos": 0,
"paid": 0,
"return_id": null,
"surcharge": 0,
"attachment": null,
"return_sale_ref": null,
"sale_id": null,
"return_sale_total": 0,
"rounding": null,
"suspend_note": null,
"api": 0,
"shop": 0,
"address_id": null,
"reserve_id": null,
"hash": "",
"cgst": 2.7,
"sgst": 2.7,
"igst": 0,
"purchase_order_number": "",
"vehicle_number": "",
"challan_number": "",
"site_address": "",
"tax_method": 1,
"sale_type": 2,
"sattlementAmount": 0
},
"rows": [
{
"id": 8305,
"sale_id": 744,
"product_id": 1057,
"product_code": 13780471,
"product_name": "Magiee Noodles 20rs",
"product_type": "standard",
"option_id": null,
"net_unit_price": 20,
"unit_price": 23.6,
"quantity": 1,
"warehouse_id": 3,
"item_tax": 3.6,
"tax_rate_id": 8,
"tax": "18%",
"discount": 0,
"item_discount": 0,
"subtotal": 23.6,
"serial_no": "",
"real_unit_price": 20,
"sale_item_id": null,
"product_unit_id": 22,
"product_unit_code": "Nos",
"unit_quantity": 1,
"comment": null,
"gst": "9%",
"cgst": 1.8,
"sgst": 1.8,
"igst": 0,
"tax_code": "GST@18%",
"tax_name": "GST@18%",
"tax_rate": 18,
"image": "no_image.png",
"details": "",
"variant": null,
"hsn_code": 123341212
},
{
"id": 8306,
"sale_id": 744,
"product_id": 1058,
"product_code": 22508494,
"product_name": "GoodDay 10rs",
"product_type": "standard",
"option_id": null,
"net_unit_price": 10,
"unit_price": 11.8,
"quantity": 1,
"warehouse_id": 3,
"item_tax": 1.8,
"tax_rate_id": 8,
"tax": "18%",
"discount": 0,
"item_discount": 0,
"subtotal": 11.8,
"serial_no": "",
"real_unit_price": 10,
"sale_item_id": null,
"product_unit_id": 22,
"product_unit_code": "Nos",
"unit_quantity": 1,
"comment": null,
"gst": "9%",
"cgst": 0.9,
"sgst": 0.9,
"igst": 0,
"tax_code": "GST@18%",
"tax_name": "GST@18%",
"tax_rate": 18,
"image": "no_image.png",
"details": "",
"variant": null,
"hsn_code": 1233412
}
],
"return_sale": null,
"return_rows": null
}
]
I want to print all the arrays separately in seperate grid views. Currently in grid view but then after i will be using this data in crystal reports, so if possible please suggest way to direct use the data to crystal reports as well.
What I have tried:
I have tried
WebClient wc = new WebClient();
var json = wc.DownloadString("url");
List<User> users = JsonConvert.DeserializeObject<List<User>>(json);
dataGridView1.DataSource = users;
It shows the blank data.