Class ComponentJsonSerializer
Namespace: Void.Minecraft.Components.Text.Serializers
Assembly: Void.Minecraft.dll
Converts Minecraft text components to and from their JSON representation.
public static class ComponentJsonSerializerInheritance
object ← ComponentJsonSerializer
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Deserialize(string)
Parses and deserializes a JSON component string.
public static Component Deserialize(string value)Parameters
value string
The JSON text.
Returns
The deserialized component, or
Exceptions
value is not valid JSON.
Deserialize(JsonNode)
Deserializes a component from a JSON node through the NBT serializer.
public static Component Deserialize(JsonNode node)Parameters
node JsonNode
The JSON representation.
Returns
The deserialized component.
Serialize(Component)
Serializes a component through its NBT representation.
public static JsonNode Serialize(Component component)Parameters
component Component
The component to serialize.
Returns
The JSON node representing the component.