-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I've tried to deserialize file that contains some comments starts with "\" and I got some weird results. When I enumerate VToken through foreach, it sends me VValue struct with comment itself. Please fix.
VProperty subtitles = VdfConvert.Deserialize(reader: new StreamReader(subtitlesTextStream, leaveOpen: true));
VToken subtitlesTokens = subtitles.Value["Tokens"] ?? throw new InvalidDataException("Cannot find 'Tokens' property.");
foreach (VToken token in subtitlesTokens)
{
// subtitlesTokens could send me VValue comment. why??
if (token is VProperty property)
{
string key = property.Key;
string value = property.Value.ToString();
tokens.Add(new KeyValuePair<string, string>(key, value));
}
}
Metadata
Metadata
Assignees
Labels
No labels