2014-02-26 33 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。