Header menu logo JDeck

Decoding Type

Static members

Static member Description

Decoding.auto (json, options, ?docOptions)

Full Usage: Decoding.auto (json, options, ?docOptions)

Parameters:
Returns: Task<Result<'TResult, DecodeError>>
Modifiers: inline
Type parameters: 'TResult

Attempts to decode a JSON stream using a JsonDocument instance. Without any decoder, works just like `JsonSerializer.Deserialize(json)`.

You can pass JsonSerializerOptions to customize the deserialization process and even include your decoders.

json : Stream

options : JsonSerializerOptions

?docOptions : JsonDocumentOptions

Returns: Task<Result<'TResult, DecodeError>>

Decoding.auto (json, ?docOptions)

Full Usage: Decoding.auto (json, ?docOptions)

Parameters:
Returns: Task<Result<'TResult, DecodeError>>
Modifiers: inline
Type parameters: 'TResult

Attempts to decode a JSON stream using a JsonDocument instance. Without any decoder, works just like `JsonSerializer.Deserialize(json)`.

json : Stream

?docOptions : JsonDocumentOptions

Returns: Task<Result<'TResult, DecodeError>>

Decoding.auto (json, options, ?docOptions)

Full Usage: Decoding.auto (json, options, ?docOptions)

Parameters:
Returns: Result<'TResult, DecodeError>
Modifiers: inline
Type parameters: 'TResult

Attempts to decode a JSON byte array using a JsonDocument instance. Without any decoder, works just like `JsonSerializer.Deserialize(json)`.

You can pass JsonSerializerOptions to customize the deserialization process and even include your decoders.

json : byte array

options : JsonSerializerOptions

?docOptions : JsonDocumentOptions

Returns: Result<'TResult, DecodeError>

Decoding.auto (json, ?docOptions)

Full Usage: Decoding.auto (json, ?docOptions)

Parameters:
Returns: Result<'TResult, DecodeError>
Modifiers: inline
Type parameters: 'TResult

Attempts to decode a JSON byte array using a JsonDocument instance. Without any decoder, works just like `JsonSerializer.Deserialize(json)`.

json : byte array

?docOptions : JsonDocumentOptions

Returns: Result<'TResult, DecodeError>

Decoding.auto (json, options, ?docOptions)

Full Usage: Decoding.auto (json, options, ?docOptions)

Parameters:
Returns: Result<'TResult, DecodeError>
Modifiers: inline
Type parameters: 'TResult

Attempts to decode a JSON string using a JsonDocument instance. Without any decoder, works just like `JsonSerializer.Deserialize(json)`.

You can pass JsonSerializerOptions to customize the deserialization process and even include your decoders.

json : string

options : JsonSerializerOptions

?docOptions : JsonDocumentOptions

Returns: Result<'TResult, DecodeError>

Decoding.auto (json, ?docOptions)

Full Usage: Decoding.auto (json, ?docOptions)

Parameters:
Returns: Result<'TResult, DecodeError>
Modifiers: inline
Type parameters: 'TResult

Attempts to decode a JSON string using a JsonDocument instance. Without any decoder, works just like `JsonSerializer.Deserialize(json)`.

json : string

?docOptions : JsonDocumentOptions

Returns: Result<'TResult, DecodeError>

Decoding.fromBytes (value, decoder)

Full Usage: Decoding.fromBytes (value, decoder)

Parameters:
    value : byte array -
    decoder : Decoder<'TResult> -

Returns: Result<'TResult, DecodeError>
Modifiers: inline
Type parameters: 'TResult

Takes a string, a decoder and attempts to decode the string into the desired type.

value : byte array

decoder : Decoder<'TResult>

Returns: Result<'TResult, DecodeError>

Decoding.fromBytes (value, options, decoder)

Full Usage: Decoding.fromBytes (value, options, decoder)

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

Takes a string, a decoder and attempts to decode the string into the desired type.

value : byte array

options : JsonDocumentOptions

decoder : JsonElement -> 'TResult

Returns: 'TResult

Decoding.fromBytesCol (value, decoder)

Full Usage: Decoding.fromBytesCol (value, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Modifiers: inline
Type parameters: 'TResult

Takes a byte array, a decoder and attempts to decode the byte array into the desired type.

This method will take a result that collects all the errors that occur during the decoding process.

value : byte array

decoder : CollectErrorsDecoder<'TResult>

Returns: Result<'TResult, DecodeError list>

Decoding.fromBytesCol (value, options, decoder)

Full Usage: Decoding.fromBytesCol (value, options, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Modifiers: inline
Type parameters: 'TResult

Takes a byte array, a decoder and attempts to decode the byte array into the desired type.

This method will take a result that collects all the errors that occur during the decoding process.

value : byte array

options : JsonDocumentOptions

decoder : CollectErrorsDecoder<'TResult>

Returns: Result<'TResult, DecodeError list>

Decoding.fromStream (value, decoder)

Full Usage: Decoding.fromStream (value, decoder)

Parameters:
Returns: Task<Result<'TResult, DecodeError>>
Modifiers: inline
Type parameters: 'TResult

Takes a string, a decoder and attempts to decode the string into the desired type.

value : Stream

decoder : Decoder<'TResult>

Returns: Task<Result<'TResult, DecodeError>>

Decoding.fromStream (value, options, decoder)

Full Usage: Decoding.fromStream (value, options, decoder)

Parameters:
Returns: Task<'TResult>
Modifiers: inline
Type parameters: 'TResult

Takes a string, a decoder and attempts to decode the string into the desired type.

value : Stream

options : JsonDocumentOptions

decoder : JsonElement -> 'TResult

Returns: Task<'TResult>

Decoding.fromStreamCol (value, decoder)

Full Usage: Decoding.fromStreamCol (value, decoder)

Parameters:
Returns: Task<Result<'TResult, DecodeError list>>
Modifiers: inline
Type parameters: 'TResult

Takes a stream, a decoder and attempts to decode the stream into the desired type.

This method will take a result that collects all the errors that occur during the decoding process.

value : Stream

decoder : CollectErrorsDecoder<'TResult>

Returns: Task<Result<'TResult, DecodeError list>>

Decoding.fromStreamCol (value, options, decoder)

Full Usage: Decoding.fromStreamCol (value, options, decoder)

Parameters:
Returns: Task<Result<'TResult, DecodeError list>>
Modifiers: inline
Type parameters: 'TResult

Takes a stream, a decoder and attempts to decode the stream into the desired type.

This method will take a result that collects all the errors that occur during the decoding process.

value : Stream

options : JsonDocumentOptions

decoder : CollectErrorsDecoder<'TResult>

Returns: Task<Result<'TResult, DecodeError list>>

Decoding.fromString (value, decoder)

Full Usage: Decoding.fromString (value, decoder)

Parameters:
    value : string -
    decoder : Decoder<'TResult> -

Returns: Result<'TResult, DecodeError>
Modifiers: inline
Type parameters: 'TResult

Takes a string, a decoder and attempts to decode the string into the desired type.

value : string

decoder : Decoder<'TResult>

Returns: Result<'TResult, DecodeError>

Decoding.fromString (value, options, decoder)

Full Usage: Decoding.fromString (value, options, decoder)

Parameters:
Returns: Result<'TResult, DecodeError>
Modifiers: inline
Type parameters: 'TResult

Takes a string, a decoder and attempts to decode the string into the desired type.

value : string

options : JsonDocumentOptions

decoder : Decoder<'TResult>

Returns: Result<'TResult, DecodeError>

Decoding.fromStringCol (value, decoder)

Full Usage: Decoding.fromStringCol (value, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Modifiers: inline
Type parameters: 'TResult

Takes a string, a decoder and attempts to decode the string into the desired type.

This method will take a result that collects all the errors that occur during the decoding process.

value : string

decoder : CollectErrorsDecoder<'TResult>

Returns: Result<'TResult, DecodeError list>

Decoding.fromStringCol (value, options, decoder)

Full Usage: Decoding.fromStringCol (value, options, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Modifiers: inline
Type parameters: 'TResult

Takes a string, a decoder and attempts to decode the string into the desired type.

This method will take a result that collects all the errors that occur during the decoding process.

value : string

options : JsonDocumentOptions

decoder : CollectErrorsDecoder<'TResult>

Returns: Result<'TResult, DecodeError list>

Type something to start searching.