API Browser

Class

ResultJsonConverter<T, E>

class ResultJsonConverter<T, E>

Namespace: System
Assembly: Raven.Core.dll
Source file: Result.rvn

Inheritance: Object → JsonConverter → JsonConverter<Result<T, E>> → ResultJsonConverter<T, E>

Converts Result values to and from tagged JSON objects.

Constructors

1 item
ResultJsonConverter() Converts `Result` values to and from tagged JSON objects.

Properties

2 items
HandleNull: bool Gets a value that indicates whether should be passed to the converter on serialization, and whether System.Text.Json.JsonTokenType.Null should be passed on deserialization. Inherited from JsonConverter<Result<T, E>>.HandleNull
Type: Type Gets the type being converted by the current converter instance. Inherited from JsonConverter<Result<T, E>>.Type

Methods

9 items
CanConvert(typeToConvert: Type) -> bool Determines whether the specified type can be converted. Inherited from JsonConverter<Result<T, E>>.CanConvert
Equals(obj: object?) -> bool Determines whether the specified object is equal to the current object. Inherited from Object.Equals
GetHashCode() -> int Serves as the default hash function. Inherited from Object.GetHashCode
GetType() -> Type Gets the System.Type of the current instance. Inherited from Object.GetType
Read(reader: ref Utf8JsonReader, typeToConvert: Type, options: JsonSerializerOptions) -> Result<T, E> Reads a tagged JSON object as an `Ok` or `Failure` result. Overrides JsonConverter<Result<T, E>>.Read
ReadAsPropertyName(reader: ref Utf8JsonReader, typeToConvert: Type, options: JsonSerializerOptions) -> Result<T, E> Reads a dictionary key from a JSON property name. Inherited from JsonConverter<Result<T, E>>.ReadAsPropertyName
ToString() -> string? Returns a string that represents the current object. Inherited from Object.ToString
Write(writer: Utf8JsonWriter, value: Result<T, E>, options: JsonSerializerOptions) -> () Writes a result as a tagged JSON object. Overrides JsonConverter<Result<T, E>>.Write
WriteAsPropertyName(writer: Utf8JsonWriter, value: Result<T, E>, options: JsonSerializerOptions) -> () Writes a dictionary key as a JSON property name. Inherited from JsonConverter<Result<T, E>>.WriteAsPropertyName

Operators

1 item
Static extension member: implicit conversion<T>(value: ResultJsonConverter<T, E>?) -> Optional<ResultJsonConverter<T, E>> Converts a nullable reference to `Some`, or to `None` when it is `null`. Extension from OptionalExtensions1<T>.op_Implicit