简体   繁体   中英

C# data convert to xml

I have some data retrieved from web in following format (in a stream):

{"parts":[
{"title":"Heading1","logo":"http:\/\/asd.com\/3.png","date":{"d":"24","m":"01","y":"2012"},
"blocks":[
    [
    {"time":"01:23","link":"http:\/\/google.com","title":"titleName1","info":"someinfo...","image":"http:\/\/url22.jpg","is_ended":true,"is_active":false,"description":"","description1":"","description2":""},
    {"time":"01:24","link":"","title":"titleName2","info":"","image":"http:\/\/asd.as\/6.jpg","is_ended":true,"is_active":false,"description":"","description1":"","description2":""},
    {"time":"05:25","link":"","title":"titleName2","info":"someinfo","image":"http:\/6.jpg","is_ended":false,"is_active":false,"description":"","description1":"","description2":""}
    ]
    ]
}
]
}

Now I need to get this to XML format or any decent format to work with. Is this data in any standard format?

Any hints appreciated.

That's called JSON.
You can use JSON.Net (available on NuGet) to parse it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM