Skip to content

ServiceStackTextFormatter

pedroreys edited this page May 11, 2012 · 2 revisions

This formatter handles application/json MIME type. It uses ServiceStack.Text for serialization.

By default, ServiceStackTextJsonMediaTypeFormatter uses ISO8601 date format. To change it to use a different date format supported by ServiceStack.Text, provide the JsonDateHandler to be used during the serialization/deserialization process as an argument for the formatter constructor.

var formatter = new ServiceStackTextFormatter(JsonDateHandler.TimestampOffset);