UBinarySizeJsonConverter Class

Converts the UBinarySize structure to or from JSON.

Definition

Namespace: Ookii
Assembly: Ookii.BinarySize (in Ookii.BinarySize.dll) Version: 1.2.0+20f0bdf981c7baf115c68ccab612b1a031efcb4d
C#
public class UBinarySizeJsonConverter : JsonConverter<UBinarySize>
Inheritance
Object    JsonConverter    JsonConverterUBinarySize    UBinarySizeJsonConverter

Remarks

This class is used to serialize UBinarySize values when using the JsonSerializer class.

UBinarySize values are serialized to JSON as strings, allowing the use of values with binary size suffixes.

Constructors

UBinarySizeJsonConverter Initializes a new instance of the UBinarySizeJsonConverter class.
UBinarySizeJsonConverter(BinarySizeOptions) Initializes a new instance of the UBinarySizeJsonConverter class with the specified options.

Properties

HandleNullGets a value that indicates whether should be passed to the converter on serialization, and whether Null should be passed on deserialization.
(Inherited from JsonConverterUBinarySize)
Options Gets a value that indicates how units are interpreted when converting from a string.
TypeGets the type being converted by the current converter instance.
(Inherited from JsonConverterUBinarySize)

Methods

CanConvertDetermines whether the specified type can be converted.
(Inherited from JsonConverterUBinarySize)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ReadReads and converts the JSON to type T.
(Overrides JsonConverterTRead(Utf8JsonReader, Type, JsonSerializerOptions))
ReadAsPropertyNameReads a dictionary key from a JSON property name.
(Inherited from JsonConverterUBinarySize)
ToStringReturns a string that represents the current object.
(Inherited from Object)
WriteWrites a specified value as JSON.
(Overrides JsonConverterTWrite(Utf8JsonWriter, T, JsonSerializerOptions))
WriteAsPropertyNameWrites a dictionary key as a JSON property name.
(Inherited from JsonConverterUBinarySize)

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also