Fix bug where the string "null" (without quotes) is deserialized as a string, instead of null.

This commit is contained in:
Jesse Beder
2013-04-13 18:21:06 -05:00
parent e0ae477b8f
commit 2375f2c66b
2 changed files with 19 additions and 0 deletions

View File

@@ -75,6 +75,12 @@ namespace YAML
ParseProperties(tag, anchor);
const Token& token = m_scanner.peek();
if(token.type == Token::PLAIN_SCALAR && token.value == "null") {
eventHandler.OnNull(mark, anchor);
m_scanner.pop();
return;
}
// add non-specific tags
if(tag.empty())