Class FormUrlEncodedMessageSerializer

Assembly: redb.Route.dll

HTML form data as a data format, registered by default:
Unmarshal<FormBody>("application/x-www-form-urlencoded") or ConvertBody<FormBody>() after an
HTTP consumer reads the posted fields, Marshal("application/x-www-form-urlencoded") writes a
or a dictionary of strings. Parsing and encoding follow the WHATWG URL standard.

public sealed class FormUrlEncodedMessageSerializer : IMessageSerializer

Inheritance

Object→FormUrlEncodedMessageSerializer

Implements

Properties

ContentType

Content type this serializer handles (e.g., "application/json").

public string ContentType { get; }

Methods

Deserialize(byte[], Type)

Deserializes a byte array to a typed value.

public object? Deserialize(byte[] data, Type type)

Deserialize<T>(byte[])

Deserializes a byte array to a typed value.

public T? Deserialize<T>(byte[] data)

Serialize<T>(T)

Serializes a value to a byte array.

public byte[] Serialize<T>(T value)

Constructors

FormUrlEncodedMessageSerializer()

A format with the default options (UTF-8, ASP.NET Core limits).

Remarks

Unmarshal targets: (every field, in order) and Dictionary<string, string>
(the first value of each name). Marshal sources: and any sequence of string pairs, such as
IDictionary<string, string>.