I have parse data but it's not properly parse in c#
Loading
I have parse data but it's not properly parse in c#
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Mar 3, 2022, 3:10 AM EST
Jignesh KumarRank #91 · 22.9K reputationPosted Mar 4, 2022, 3:59 AM EST
RohanRank #1,549 · 1K reputationPosted Mar 3, 2022, 3:01 AM EST
This is my code
{
"Result": [
{
"key": {
"SearchTerm": "flwer"
},
"data": [
{
"ImgUrl": "https://blog.tucktools.com",
"Name": "Jhon",
"Title": "owershop",
"Description": "in delivery Hong Kong"
},
{
"ImgUrl": "wershop.com",
"Name": "Jhon Cena",
"Title": "1800flowers",
"Description": "FLOWERS.COM"
}
]
},
{
"key": {
"SearchTerm": "Pizza"
},
"data": [
{
"ImgUrl": "https://abc.png",
"Name": "Harry",
"Title": "com",
"Description": "Tamela Todd"
},
{
"ImgUrl": "gardenp.com",
"Name": "Roma",
"Title": "com",
"Description": " Thelma Todd"
}
]
}
]
}
Please parse this using c#
RohanRank #1,549 · 1K reputationPosted Mar 3, 2022, 3:13 AM EST
RohanRank #1,549 · 1K reputationPosted Mar 3, 2022, 4:22 AM EST
I have parse this data it's properly parse
var data = "{\"publisResult\":[{\"key\":{\"SearchTerm\":\"flower\"},\"data\":[{\"PublisImgUrl\":\"https://abc.png\",\"Name\":\"Jhon\",\"Title\":\"gardenflowershop\",\"Description\":\"OnlineFlowerShopsindeliveryHongKong\"},{\"PublisImgUrl\":\"garden.com\",\"Name\":\"JhonCena\",\"Title\":\"weddings\",\"Description\":\"WeddingFlowersandGifts|1-800-FLOWERS.COM\"}]},{\"key\":{\"SearchTerm\":\"Pizza\"},\"data\":[{\"PublisImgUrl\":\"https://abc.png\",\"Name\":\"Harry\",\"Title\":\"benny-drinnon.com\",\"Description\":\"TAMELAC.TODD-Home|TamelaTodd\"},{\"PublisImgUrl\":\"gardenflowershop\",\"Name\":\"Roma\",\"Title\":\"benny-drinnon.blogspot\",\"Description\":\"MichelleMorganTalksThelma\"}]}]}";
dynamic json= JObject.Parse(data);
But here one issue face
Here First and Last one breakt extra add
"{{\"publisResult\":[{\"key\":{\"SearchTerm\":\"flower\"},\"data\":[{\"PublisImgUrl\":\"https://abc.png\",\"Name\":\"Jhon\",\"Title\":\"gardenflowershop\",\"Description\":\"OnlineFlowerShopsindeliveryHongKong\"},{\"PublisImgUrl\":\"garden.com\",\"Name\":\"JhonCena\",\"Title\":\"weddings\",\"Description\":\"WeddingFlowersandGifts|1-800-FLOWERS.COM\"}]},{\"key\":{\"SearchTerm\":\"Pizza\"},\"data\":[{\"PublisImgUrl\":\"https://abc.png\",\"Name\":\"Harry\",\"Title\":\"benny-drinnon.com\",\"Description\":\"TAMELAC.TODD-Home|TamelaTodd\"},{\"PublisImgUrl\":\"gardenflowershop\",\"Name\":\"Roma\",\"Title\":\"benny-drinnon.blogspot\",\"Description\":\"MichelleMorganTalksThelma\"}]}}]}";