Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

Create

static func Create(value: object) -> Result<HttpContent, JsonError>

Declaring type: JsonContent
Module: System.Web.Http.Json
Assembly: System.Web.dll
Source file: JsonContent.rvn

Serializes a model into buffered UTF-8 HTTP content.

Parameters

Name Type Description
value Object Supported model or existing JSON node, using JsonSerializer mapping rules.

Return value

Result<HttpContent, JsonError>

Content tagged application/json; charset=utf-8, or the original JsonError.

Remarks

No network I/O. Invalid models produce no content. Getter Faults remain terminal.