Method
ReadNode
static func ReadNode(content: HttpContent) -> Result<JsonValue, JsonError>
Declaring type: JsonContent
Module: System.Web.Http.Json
Assembly: System.Web.dll
Source file: JsonContent.rvn
Parses buffered HTTP bytes into the closed JSON DOM.
Parameters
| Name | Type | Description |
|---|---|---|
content |
HttpContent | Request or response content, retained and readable afterward. |
Return value
A node or JsonError. Invalid UTF-8 returns Read(InvalidUtf8); empty input is a syntax error; JSON null is a JsonNull node.
Remarks
Checks the 1024-byte limit before decoding. Does not validate Content-Type or HTTP status. Stream content is consumed once asynchronously; its read token controls transport reads.