Restful 支持 自定义序列化

 [ServiceContract]
    [ServiceKnownType(typeof(HRAwardObject))]
    [ServiceKnownType(typeof(WorkflowBasicInformationBaseObject))]
    [ServiceKnownType(typeof(MeetingBaseObject))]
    [ServiceKnownType(typeof(WorkflowBaseObject))]
    [ServiceKnownType(typeof(WebObject))]
    [ServiceKnownType(typeof(NominationReasonObject))]
    //[ServiceKnownType(typeof(NominationReasonObjectEx))]
    [ServiceKnownType(typeof(List<NominationReasonObject>))]
  public  interface IHRAwardService
    {
        [OperationContract]
        [WebGet(UriTemplate = "/getitem/lastest/{eventNo}", BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)]
        Stream GetLastestItem(string eventNo);

 

posted on 2015-03-24 13:33  空明流光  阅读(172)  评论(0编辑  收藏  举报

导航