mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Fix bug where the string "null" (without quotes) is deserialized as a string, instead of null.
This commit is contained in:
@@ -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())
|
||||
|
Reference in New Issue
Block a user