Decode Module
Functions and values
| Function or value | Description |
Full Usage:
array decoder el
Parameters:
IndexedDecoder<'TResult>
-
el : JsonElement
-
Returns: Result<'TResult array, DecodeError>
Modifiers: inline Type parameters: 'TResult |
If a failure is encountered in the decoding process, the decoding stops there, and the error is returned, the rest of the array is not decoded.
|
Full Usage:
auto el
Parameters:
JsonElement
-
Returns: Result<'TResult, DecodeError>
Modifiers: inline Type parameters: 'TResult |
For the most part it is recommended that you use this function unless you have a "F# types based" object like discriminated unions, Which are not supported by the standard deserialization means.
|
Full Usage:
autoJsonOptions options el
Parameters:
JsonSerializerOptions
-
el : JsonElement
-
Returns: Result<'TResult, DecodeError>
Modifiers: inline Type parameters: 'TResult |
For the most part it is recommended that you use this function unless you have a "F# types based" object like discriminated unions, Which are not supported by the standard deserialization means.
|
Full Usage:
collectOneOf decoders element
Parameters:
Decoder<'TResult> seq
-
element : JsonElement
-
Returns: Result<'TResult, DecodeError list>
|
This is useful to decode JSON elements into discriminated unions
|
Full Usage:
decodeAt decoder index el
Parameters:
Decoder<'TResult>
-
index : int
-
el : JsonElement
-
Returns: Result<'TResult, DecodeError>
Modifiers: inline Type parameters: 'TResult |
|
Full Usage:
decodeAtKey decoder key el
Parameters:
Decoder<'TResult>
-
key : string
-
el : JsonElement
-
Returns: Result<'TResult, DecodeError>
Modifiers: inline Type parameters: 'TResult |
|
Full Usage:
dict decoder el
Parameters:
IndexedMapDecoder<'TValue>
-
el : JsonElement
-
Returns: Result<Dictionary<string, 'TValue>, DecodeError>
Modifiers: inline Type parameters: 'TValue |
|
Full Usage:
dictCol decoder el
Parameters:
IndexedMapCollectErrorsDecoder<'TValue>
-
el : JsonElement
-
Returns: Result<Dictionary<string, 'TValue>, DecodeError seq>
Modifiers: inline Type parameters: 'TValue |
|
Full Usage:
list decoder el
Parameters:
IndexedDecoder<'TResult>
-
el : JsonElement
-
Returns: Result<'TResult list, DecodeError>
Modifiers: inline Type parameters: 'TResult |
If a failure is encountered in the decoding process, the decoding stops there and the error is returned, the rest of the array is not decoded.
|
Full Usage:
map decoder el
Parameters:
IndexedMapDecoder<'TValue>
-
el : JsonElement
-
Returns: Result<Map<string, 'TValue>, DecodeError>
Modifiers: inline Type parameters: 'TValue |
|
Full Usage:
mapCol decoder el
Parameters:
IndexedMapCollectErrorsDecoder<'TValue>
-
el : JsonElement
-
Returns: Result<Map<string, 'TValue>, DecodeError seq>
Modifiers: inline Type parameters: 'TValue |
|
|
|
Full Usage:
sequence decoder el
Parameters:
IndexedDecoder<'TResult>
-
el : JsonElement
-
Returns: Result<'TResult seq, DecodeError>
Modifiers: inline Type parameters: 'TResult |
If a failure is encountered in the decoding process, the decoding stops there and the error is returned, the rest of the array is not decoded.
|
Full Usage:
sequenceCol decoder el
Parameters:
IndexedCollectErrorsDecoder<'a>
-
el : JsonElement
-
Returns: Result<'a seq, DecodeError list>
Modifiers: inline Type parameters: 'a |
If a failure is encountered in the decoding process, the error is collected and the decoding continues however, the result will be an error containing a list of all the errors that occurred during the decoding process.
|
Full Usage:
tryDecodeAt decoder index el
Parameters:
Decoder<'TResult>
-
index : int
-
el : JsonElement
-
Returns: Result<'TResult option, DecodeError>
Modifiers: inline Type parameters: 'TResult |
If the element is not found, this will not fail but return an option type.
|
Full Usage:
tryDecodeAtKey decoder key el
Parameters:
Decoder<'TResult>
-
key : string
-
el : JsonElement
-
Returns: Result<'TResult option, DecodeError>
Modifiers: inline Type parameters: 'TResult |
If the element is not found, this will not fail but return an option type.
|
JDeck