Skip to content

Class NbtUnsafeStringSerializer

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

Provides a permissive, JSON-assisted parser for a limited subset of SNBT.

public static class NbtUnsafeStringSerializer

Inheritance

objectNbtUnsafeStringSerializer

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks

The parser only quotes word-character keys and converts simple single-quoted values; it is not a complete SNBT parser.

Methods

Deserialize(string)

Converts supported SNBT-like syntax to JSON and infers an NBT tag from it.

public static NbtTag Deserialize(string value)

Parameters

value string

The permissive SNBT-like input.

Returns

NbtTag

The inferred NBT tag.

Serialize(NbtTag)

Serializes a tag using the standard SNBT serializer.

public static string Serialize(NbtTag tag)

Parameters

tag NbtTag

The tag to serialize.

Returns

string

The SNBT representation.