Header menu logo issie

ConverterExtensions Module

Type extensions

Type extension Description

Json.convertFromJsonAs input

Full Usage: Json.convertFromJsonAs input

Parameters:
Returns: 't
Modifiers: inline
Type parameters: 't

Tries to convert parsed JSON object as the given type parameter argument, this method is used when you want to apply transformations to the JSON object before parsing

Extended Type: Json

input : Json
Returns: 't

Json.parseAs input

Full Usage: Json.parseAs input

Parameters:
    input : string

Returns: 't
Modifiers: inline
Type parameters: 't

Parses the input string as JSON and tries to convert it as the given type argument

Extended Type: Json

input : string
Returns: 't

Json.parseNativeAs input

Full Usage: Json.parseNativeAs input

Parameters:
    input : string

Returns: 't
Modifiers: inline
Type parameters: 't

Parses the input string as JSON using native parsing and tries to convert it as the given type argument

Extended Type: Json

input : string
Returns: 't

Json.serialize value

Full Usage: Json.serialize value

Parameters:
    value : 't

Returns: string
Modifiers: inline
Type parameters: 't

Serialized the input value into JSON using Reflection. Compatible with Fable 2.x and Fable 3 (codename: nagareyama)

Extended Type: Json

value : 't
Returns: string

Json.stringify value

Full Usage: Json.stringify value

Parameters:
    value : obj

Returns: string

Serialized the input value object into JSON, uses built-in JSON.stringify and should be used with Fable 2.x or earlier

Extended Type: Json

value : obj
Returns: string

Json.tryConvertFromJsonAs input

Full Usage: Json.tryConvertFromJsonAs input

Parameters:
Returns: Result<'t, string>
Modifiers: inline
Type parameters: 't

Tries to convert parsed JSON object as the given type parameter argument, this method is used when you want to apply transformations to the JSON object before parsing

Extended Type: Json

input : Json
Returns: Result<'t, string>

Json.tryParseAs input

Full Usage: Json.tryParseAs input

Parameters:
    input : string

Returns: Result<'t, string>
Modifiers: inline
Type parameters: 't

Tries to parse the input string as JSON and tries to convert it as the given type argument, returing a (hopefully) useful error message when it fails

Extended Type: Json

input : string
Returns: Result<'t, string>

Json.tryParseNativeAs input

Full Usage: Json.tryParseNativeAs input

Parameters:
    input : string

Returns: Result<'t, string>
Modifiers: inline
Type parameters: 't

Tries to parse the input string as JSON using native parsing and tries to convert it as the given type argument

Extended Type: Json

input : string
Returns: Result<'t, string>

Type something to start searching.