read

public static Object read(String snbt)

Read an NBT value from an SNBT (stringified NBT) string.

If you are sure that your data will be an NBTCompound or NBTList, you may use readCompound and readList respectively. Unlike those methods, this one will directly parse and return SNBT literals (e.g. 1b, 12.34F, "Hello World", 450s, etc) and array types.

Return

The parsed NBT value (type will vary)

Parameters

snbt

The text to parse into NBT

Throws

If the input string cannot be read or is not valid SNBT


public static Object read(    String snbt,     boolean internNames,     boolean internValues)

Same as read, but with additional control over the interning of tag names and values

See also

Parameters

internNames

Whether or not tag names inside of compounds will be interned

internValues

Whether or not STRING values inside compounds and lists will be interned