Skip to content

Class NbtTagJsonConverter

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

public class NbtTagJsonConverter : JsonConverter<NbtTag>

Inheritance

objectJsonConverterJsonConverter<NbtTag>NbtTagJsonConverter

Inherited Members

JsonConverter<NbtTag>.CanConvert(Type), JsonConverter<NbtTag>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions), JsonConverter<NbtTag>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions), JsonConverter<NbtTag>.Write(Utf8JsonWriter, NbtTag, JsonSerializerOptions), JsonConverter<NbtTag>.WriteAsPropertyName(Utf8JsonWriter, NbtTag, JsonSerializerOptions), JsonConverter<NbtTag>.HandleNull, JsonConverter<NbtTag>.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()

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type .

public override NbtTag 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

NbtTag

The converted value.

Write(Utf8JsonWriter, NbtTag, JsonSerializerOptions)

Writes a specified value as JSON.

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

Parameters

writer Utf8JsonWriter

The writer to write to.

tag NbtTag

options JsonSerializerOptions

An object that specifies serialization options to use.