Skip to content

Class NbtDoubleJsonConverter

Namespace: Void.Minecraft.Nbt.Serializers.Json.Tags
Assembly: Void.Minecraft.dll

Converts an tag to a JSON number containing its double-precision value.

public class NbtDoubleJsonConverter : JsonConverter<NbtDouble>

Inheritance

objectJsonConverterJsonConverter<NbtDouble>NbtDoubleJsonConverter

Inherited Members

JsonConverter<NbtDouble>.CanConvert(Type), JsonConverter<NbtDouble>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions), JsonConverter<NbtDouble>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions), JsonConverter<NbtDouble>.Write(Utf8JsonWriter, NbtDouble, JsonSerializerOptions), JsonConverter<NbtDouble>.WriteAsPropertyName(Utf8JsonWriter, NbtDouble, JsonSerializerOptions), JsonConverter<NbtDouble>.HandleNull, JsonConverter<NbtDouble>.Type, JsonConverter.CanConvert(Type), JsonConverter.Type, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks

This converter supports serialization only. Deserialization through throws a .

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type .

public override NbtDouble Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An object that specifies serialization options to use.

Returns

NbtDouble

The converted value.

Write(Utf8JsonWriter, NbtDouble, JsonSerializerOptions)

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, NbtDouble tag, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

tag NbtDouble

options JsonSerializerOptions

An object that specifies serialization options to use.