Allows root tag to be serialized without a name
This commit is contained in:
parent
d885485684
commit
396c660113
1 changed files with 8 additions and 4 deletions
|
@ -86,10 +86,14 @@ abstract class Tag {
|
|||
if (tag.getType() != 0) {
|
||||
if (!builder.isEmpty) {
|
||||
// Write name
|
||||
if (tag.shouldQuoteName()) {
|
||||
builder.append("${"".padLeft(indents, "\t")}\"${tag.getKey()}\": ");
|
||||
} else
|
||||
builder.append("${"".padLeft(indents, '\t')}${tag.getKey()}: ");
|
||||
if (tag._key == "") {
|
||||
builder.append("${"".padLeft(indents, '\t')}");
|
||||
} else {
|
||||
if (tag.shouldQuoteName()) {
|
||||
builder.append("${"".padLeft(indents, "\t")}\"${tag.getKey()}\": ");
|
||||
} else
|
||||
builder.append("${"".padLeft(indents, '\t')}${tag.getKey()}: ");
|
||||
}
|
||||
}
|
||||
|
||||
tag.writeStringifiedValue(builder, indents + 1, false);
|
||||
|
|
Loading…
Reference in a new issue