HtmlFormatterExtensions Class

Provides extension methods to register the HTML formatter.

public static class HtmlFormatterExtensions

Methods

NameDescription
AddHtmlFormatter(HumanReadableSerializerOptions, HtmlFormatterOptions?)Formats the values whose media type is text/html: the value is parsed and serialized back, as defined by the HTML specification.

AddHtmlFormatter(HumanReadableSerializerOptions, HtmlFormatterOptions?)

HtmlFormatterExtensions.cs

Formats the values whose media type is text/html: the value is parsed and serialized back, as defined by the HTML specification.

public static HumanReadableSerializerOptions AddHtmlFormatter(this HumanReadableSerializerOptions serializerOptions, HtmlFormatterOptions? formatterOptions = null)

Parameters

serializerOptions HumanReadableSerializerOptions
The options to add the formatter to.
formatterOptions HtmlFormatterOptions?
The options of the formatter, or null to use the default options.

Returns

HumanReadableSerializerOptions serializerOptions.