Property Type
This type containes methods that are particularly useful to decode properties from JSON elements. They can be primitive properties, objects, arrays, etc.
If the property is not found in the JSON element, the decoding will fail.
Static members
| Static member | Description |
Full Usage:
Property.array (name, decoder)
Parameters:
string
-
decoder : CollectErrorsDecoder<'TResult>
-
Returns: JsonElement -> Result<'TResult array, DecodeError list>
Modifiers: inline Type parameters: 'TResult |
This method will attempt to decode the type and collect all the errors that occur during the decoding process.
|
Full Usage:
Property.array (name, decoder)
Parameters:
string
-
decoder : Decoder<'TResult>
-
Returns: JsonElement -> Result<'TResult array, DecodeError>
Modifiers: inline Type parameters: 'TResult |
The decoding process will stop at the first failure and the error will be returned.
|
Full Usage:
Property.dict (name, decoder)
Parameters:
string
-
decoder : IndexedMapCollectErrorsDecoder<'TValue>
-
Returns: JsonElement -> Result<Dictionary<string, 'TValue>, DecodeError list>
Modifiers: inline Type parameters: 'TValue |
This method will attempt to decode the type and collect all the errors that occur during the decoding process. If there's an error in the decoding process, the decoding will continue until there are no more, the returned error will contain a list of all the errors that occurred.
|
Full Usage:
Property.dict (name, decoder)
Parameters:
string
-
decoder : Decoder<'TValue>
-
Returns: JsonElement -> Result<Dictionary<string, 'TValue>, DecodeError>
Modifiers: inline Type parameters: 'TValue |
The decoding process will stop at the first failure, and the error will be returned.
|
Full Usage:
Property.get (name, decoder)
Parameters:
string
-
decoder : CollectErrorsDecoder<'TResult>
-
Returns: JsonElement -> Result<'TResult, DecodeError list>
Modifiers: inline Type parameters: 'TResult |
This method will attempt to decode the type and collect all the errors that occur during the decoding process. If there's an error in the decoding process, the decoding will continue until there are no more, the returned error will contain a list of all the errors that occurred.
|
Full Usage:
Property.get (name, decoder)
Parameters:
string
-
decoder : Decoder<'TResult>
-
Returns: JsonElement -> Result<'TResult, DecodeError>
Modifiers: inline Type parameters: 'TResult |
The decoding process will stop at the first failure and the error will be returned.
|
Full Usage:
Property.list (name, decoder)
Parameters:
string
-
decoder : CollectErrorsDecoder<'TResult>
-
Returns: JsonElement -> Result<'TResult list, DecodeError list>
Modifiers: inline Type parameters: 'TResult |
This method will attempt to decode the type and collect all the errors that occur during the decoding process.
|
Full Usage:
Property.list (name, decoder)
Parameters:
string
-
decoder : Decoder<'TResult>
-
Returns: JsonElement -> Result<'TResult list, DecodeError>
Modifiers: inline Type parameters: 'TResult |
The decoding process will stop at the first failure and the error will be returned.
|
Full Usage:
Property.map (name, decoder)
Parameters:
string
-
decoder : IndexedMapCollectErrorsDecoder<'TValue>
-
Returns: JsonElement -> Result<Map<string, 'TValue>, DecodeError list>
Modifiers: inline Type parameters: 'TValue |
This method will attempt to decode the type and collect all the errors that occur during the decoding process. If there's an error in the decoding process, the decoding will continue until there are no more, the returned error will contain a list of all the errors that occurred.
|
Full Usage:
Property.map (name, decoder)
Parameters:
string
-
decoder : Decoder<'TValue>
-
Returns: JsonElement -> Result<Map<string, 'TValue>, DecodeError>
Modifiers: inline Type parameters: 'TValue |
The decoding process will stop at the first failure, and the error will be returned.
|
Full Usage:
Property.seq (name, decoder)
Parameters:
string
-
decoder : CollectErrorsDecoder<'TResult>
-
Returns: JsonElement -> Result<'TResult seq, DecodeError list>
Modifiers: inline Type parameters: 'TResult |
This method will attempt to decode the type and collect all the errors that occur during the decoding process. If there's an error in the decoding process, the decoding will continue until there are no more, the returned error will contain a list of all the errors that occurred.
|
Full Usage:
Property.seq (name, decoder)
Parameters:
string
-
decoder : Decoder<'TResult>
-
Returns: JsonElement -> Result<'TResult seq, DecodeError>
Modifiers: inline Type parameters: 'TResult |
The decoding process will stop at the first failure and the error will be returned.
|
JDeck