Skip to content

DefaultActionResultSerializer Class ​

Definition ​

Provides a default implementation of IActionResultSerializer that performs simple content negotiation and serializes payloads to either CBOR or JSON.

  • Namespace: JASE.Web
  • Assembly: JASE.Web.dll

Constructors ​

NameDescription
DefaultActionResultSerializer()

Methods ​

NameDescription
SerializedActionResult Serialize(ActionContext context, object value)Serializes the provided payload into a response body for the current action context.

Remarks ​

This serializer inspects the incoming request's Accept header and selects a response format based on basic string matching. If application/cbor is present, CBOR is used; otherwise, JSON is used as the default format.

This implementation does not perform full HTTP content negotiation and does not evaluate media type quality values (q=) or wildcards. It is intended as a lightweight, high-performance default rather than a standards-compliant negotiation engine.