F# Data


JsonValue

Namespace: FSharp.Data
Attributes:
[<RequireQualifiedAccess>]
[<StructuredFormatDisplay("{_Print}")>]

Represents a JSON value. Large numbers that do not fit in the Decimal type are represented using the Float case, while smaller numbers are represented as decimals to avoid precision loss.

Union Cases

Union CaseDescription
Array(elements)
Signature: JsonValue []
Boolean(bool)
Signature: bool
Float(float)
Signature: float
Null
Signature:
Number(decimal)
Signature: decimal
Record(properties)
Signature: (string * JsonValue) []
String(string)
Signature: string

Instance members

Instance memberDescription
Post(uri, headers)
Signature: (uri:string * headers:seq<string * string> option) -> HttpResponse
Attributes:
[<Obsolete("Please use JsonValue.Request instead")>]
WARNING: This API is obsolete

Please use JsonValue.Request instead

Request(url, httpMethod, headers)
Signature: (url:string * httpMethod:string option * headers:seq<string * string> option) -> HttpResponse

Sends the JSON to the specified URL synchronously. Defaults to a POST request.

RequestAsync(url, httpMethod, headers)
Signature: (url:string * httpMethod:string option * headers:seq<string * string> option) -> Async<HttpResponse>

Sends the JSON to the specified URL asynchronously. Defaults to a POST request.

ToString(saveOptions)
Signature: saveOptions:JsonSaveOptions -> string
WriteTo(w, saveOptions)
Signature: (w:TextWriter * saveOptions:JsonSaveOptions) -> unit

Serializes the JsonValue to the specified System.IO.TextWriter.

Static members

Static memberDescription
AsyncLoad(uri, encoding)
Signature: (uri:string * encoding:Encoding option) -> Async<JsonValue>

Loads JSON from the specified uri asynchronously

Load(uri, encoding)
Signature: (uri:string * encoding:Encoding option) -> JsonValue

Loads JSON from the specified uri

Load(reader)
Signature: reader:TextReader -> JsonValue

Loads JSON from the specified reader

Load(stream)
Signature: stream:Stream -> JsonValue

Loads JSON from the specified stream

Parse(text)
Signature: text:string -> JsonValue

Parses the specified JSON string

ParseMultiple(text)
Signature: text:string -> seq<JsonValue>

Parses the specified string into multiple JSON values

TryParse(text)
Signature: text:string -> JsonValue option

Attempts to parse the specified JSON string

Fork me on GitHub