2014-02-26 28 views
1

任何人都知道一種方法,您可以提供一些示例數據以顯示在ServiceStack中的元數據頁面上以顯示響應模型?在ServiceStack的元數據頁面上提供響應模型示例JSON數據

對於這個響應模型

public class GetIncidentResponse 
{ 
    public IEnumerable<Incident> Incidents { get; set; } 
} 

我的元數據頁

HTTP/1.1 200 OK 
Content-Type: application/json 
Content-Length: length 
{} 

上得到這個當我想能夠像顯示一些

HTTP/1.1 200 OK 
Content-Type: application/json 
Content-Length: length 
{ "Filter example 1", "Filter example 2"} 
+0

避免使用[DTO中的接口](http://stackoverflow.com/a/10759250/85785)。改爲使用具體的'List '。 – mythz

回答

1

@mythz評論解決了我的問題。將IEnemerable接口更改爲IList。