public String asString(final BinaryTag input) throws IOException {
    final StringBuilder sb = new StringBuilder();
    try (final TagStringWriter emit = new TagStringWriter(sb, this.indent)) {
      emit.legacy(this.emitLegacy);
      emit.writeTag(input);
    }
    return sb.toString();
  }
Get a string representation of the provided tag.

@param input tag to serialize
@return serialized form
@throws IOException if any errors occur writing to string
@since 4.20.0
nbt/src/main/java/net/kyori/adventure/nbt/TagStringIO.java