C#数据转换为xml

时间:2012-01-25 23:12:51

标签: c# xml json

我有以下格式从网络中检索到一些数据(在流中):

{"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":""}
    ]
    ]
}
]
}

现在我需要将其转换为XML格式或任何合适的格式才能使用。 这些数据是否采用任何标准格式?

任何提示都表示赞赏。

1 个答案:

答案 0 :(得分:4)

这就是所谓的JSON 您可以使用JSON.Net(在NuGet上提供)来解析它。