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
x.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

x.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.

x.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.

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

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

Static members

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

Loads JSON from the specified uri asynchronously

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

Loads JSON from the specified uri

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

Loads JSON from the specified reader

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

Loads JSON from the specified stream

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

Parses the specified JSON string

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

Parses the specified string into multiple JSON values

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

Attempts to parse the specified JSON string

Fork me on GitHub