1

This is a type I define

public class NewPropVideoResponse
{
    [DataMember(Order = 1)]
    public int VideoId { get; set; }
}

This is the type I want to return

NewPropVideoResponse[]

How do I use protobuff serialization?

mythz
  • 141,670
  • 29
  • 246
  • 390
nao zhao
  • 29
  • 2

1 Answers1

0

Please read the ServiceStack docs on how to register the ProtoBuf Format. Once the format is registered, if you call your Service using the ProtoBufServiceClient, the client will request the Response to be returned in application/x-protobuf and ServiceStack will respond in kind returning the response serialized in the ProtoBuf format.

mythz
  • 141,670
  • 29
  • 246
  • 390