Interfaces

Project

Pages Restful

NuGet packageOwin.Framework.Pages.Restful
GitHub sourceOwinFramework.Pages.Restful

Home |  Readme

Custom body de-serialization with OWIN Framework Pages

Service Endpoint Body Deserialization

Services and service endpoints can specify the request deserializer to use when the service endpoint accesses the body of the request. Note that if the body is not read by the application code then the deserializer is not called.

The setting on the service is the default for all endpoints that do not specify a deserializer. If the service does not specify a deserializer then Json is the default.

The deserializer is specified as a class type to use. This class type must implement the IRequestDeserializer interface.

If the service endpoint method reads the body of the request multiple times then the body of the request will only be deserialized once.

The standard libraries already contain some implementations of IRequestDeserializer that you can take advantage of in your application, but this interface is also straightforward to implement. These classes are in the OwinFramework.Pages.Restful.Serializers namespace.