JSON.Net反序列化没有基类的IEnumerable对象

时间:2013-01-29 11:01:19

标签: c# json.net

我正在使用Freeagent API,需要一种方法将JSON转换为.Net类型。使用JSON .Net我需要将以下JSON转换为IEnumerable

{ "invoices": [
  {
    "url":"https://api.freeagent.com/v2/invoices/1",
    "contact":"https://api.freeagent.com/v2/contacts/2",
    "dated_on":"2011-08-29T00:00:00+00:00",
    "due_on":"2011-09-28T00:00:00+00:00",
    "reference":"001",
    "currency":"GBP",
    "exchange_rate":"1.0",
    "net_value":"0.0",
    "sales_tax_value":"0.0",
    "status":"Draft",
    "comments":"An example invoice comment."
    "omit_header":false,
    "payment_terms_in_days":30,
    "ec_status":"Non-EC"
  }
]}

现在我不想使用基类型,如果我可以避免它,所以我希望直接将其反序列化为上面的IEnumerable。可能吗?

0 个答案:

没有答案