FSharp.Data


JsonValue Type

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 case Description

Array elements

Full Usage: Array elements

Parameters:
elements : JsonValue[]

Boolean bool

Full Usage: Boolean bool

Parameters:
    Item : bool

Item : bool

Float float

Full Usage: Float float

Parameters:
    Item : float

Item : float

Null

Full Usage: Null

Number decimal

Full Usage: Number decimal

Parameters:
    Item : decimal

Item : decimal

Record properties

Full Usage: Record properties

Parameters:
properties : (string * JsonValue)[]

String string

Full Usage: String string

Parameters:
    Item : string

Item : string

Instance members

Instance member Description

this.Request(url, ?httpMethod, ?headers)

Full Usage: this.Request(url, ?httpMethod, ?headers)

Parameters:
    url : string
    ?httpMethod : string
    ?headers : seq<string * string>

Returns: HttpResponse

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

url : string
?httpMethod : string
?headers : seq<string * string>
Returns: HttpResponse

this.RequestAsync(url, ?httpMethod, ?headers)

Full Usage: this.RequestAsync(url, ?httpMethod, ?headers)

Parameters:
    url : string
    ?httpMethod : string
    ?headers : seq<string * string>

Returns: Async<HttpResponse>

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

url : string
?httpMethod : string
?headers : seq<string * string>
Returns: Async<HttpResponse>

this.ToString(saveOptions)

Full Usage: this.ToString(saveOptions)

Parameters:
Returns: string
saveOptions : JsonSaveOptions
Returns: string

this.WriteTo(w, saveOptions)

Full Usage: this.WriteTo(w, saveOptions)

Parameters:

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

w : TextWriter
saveOptions : JsonSaveOptions

this._Print

Full Usage: this._Print

Returns: string
Returns: string

Static members

Static member Description

JsonValue.AsyncLoad(uri, ?encoding)

Full Usage: JsonValue.AsyncLoad(uri, ?encoding)

Parameters:
Returns: Async<JsonValue>

Loads JSON from the specified uri asynchronously

uri : string
?encoding : Encoding
Returns: Async<JsonValue>

JsonValue.Load(uri, ?encoding)

Full Usage: JsonValue.Load(uri, ?encoding)

Parameters:
Returns: JsonValue

Loads JSON from the specified uri

uri : string
?encoding : Encoding
Returns: JsonValue

JsonValue.Load(reader)

Full Usage: JsonValue.Load(reader)

Parameters:
Returns: JsonValue

Loads JSON from the specified reader

reader : TextReader
Returns: JsonValue

JsonValue.Load(stream)

Full Usage: JsonValue.Load(stream)

Parameters:
Returns: JsonValue

Loads JSON from the specified stream

stream : Stream
Returns: JsonValue

JsonValue.Parse(text)

Full Usage: JsonValue.Parse(text)

Parameters:
    text : string

Returns: JsonValue

Parses the specified JSON string

text : string
Returns: JsonValue

JsonValue.ParseMultiple(text)

Full Usage: JsonValue.ParseMultiple(text)

Parameters:
    text : string

Returns: seq<JsonValue>

Parses the specified string into multiple JSON values

text : string
Returns: seq<JsonValue>

JsonValue.TryParse(text)

Full Usage: JsonValue.TryParse(text)

Parameters:
    text : string

Returns: JsonValue option

Attempts to parse the specified JSON string

text : string
Returns: JsonValue option