Skip to content

Commit

Permalink
Support empty map keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Feb 24, 2024
1 parent 0de65c1 commit e6d165e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/BymlLibrary/Yaml/YamlParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,7 @@ Could not parse key node of type '{key.NodeType}'
""");
}

if (string.IsNullOrEmpty(scalar.Value)) {
throw new NotSupportedException("""
Empty (null) keys are not supported
""");
}

map[scalar.Value] = Parse(node);
map[scalar.Value ?? string.Empty] = Parse(node);
}

return map;
Expand Down

0 comments on commit e6d165e

Please sign in to comment.