如何使用C#从JSON数据下载附件?

时间:2014-09-03 19:52:44

标签: c# json rest

我是RestAPI和JSON的新手,我想知道是否可以从JSON下载文件。我正在打电话OnTime。他们提供的示例代码是用C#编写的。当我用他们的代码进行api调用以查找带有附件的项目时,这就是我回来的格式。

OK

{
    "data": [
        {
            "attach_date": "2014-08-27T18:18:54Z",
            "id": 37,
            "created_by_id": 100,
            "created_by_user_type": 0,
            "description": "",
            "file_name": "cpuz-setup.exe",
            "source_id": 2,
            "source_type": 0,
            "file_data": null,
            "data_hash": "0nW/Gi69l9o9Aw6MEvddCw=="
        }
    ]
}

我见过其他文章和博客说JSON会在JSON中为文件提供一个url。那么我想知道有没有办法从这个JSON代码下载以下文件?

如果可能,您是否可以在C#中提供示例或示例代码的链接?

0 个答案:

没有答案