F# Data


JsonValue

Namespace: FSharp.Data

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
Request(uri, httpMethod, headers)
Signature: (uri:string * httpMethod:string option * headers:seq<string * string> option) -> HttpResponse

Sends the JSON to the specified uri. Defaults to a POST request.

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

Sends the JSON to the specified uri. 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, cultureInfo)
Signature: (uri:string * cultureInfo:CultureInfo option) -> Async<JsonValue>

Loads JSON from the specified uri asynchronously

Load(uri, cultureInfo)
Signature: (uri:string * cultureInfo:CultureInfo option) -> JsonValue

Loads JSON from the specified uri

Load(reader, cultureInfo)
Signature: (reader:TextReader * cultureInfo:CultureInfo option) -> JsonValue

Loads JSON from the specified reader

Load(stream, cultureInfo)
Signature: (stream:Stream * cultureInfo:CultureInfo option) -> JsonValue

Loads JSON from the specified stream

Parse(text, cultureInfo)
Signature: (text:string * cultureInfo:CultureInfo option) -> JsonValue

Parses the specified JSON string

ParseMultiple(text, cultureInfo)
Signature: (text:string * cultureInfo:CultureInfo option) -> seq<JsonValue>

Parses the specified string into multiple JSON values

ParseSample(text, cultureInfo)
Signature: (text:string * cultureInfo:CultureInfo option) -> JsonValue

Parses the specified JSON string, tolerating invalid errors like trailing commans, and ignore content with elipsis ... or {...}

Fork me on GitHub