null keys
oleorhagen opened this issue Β· comments
Hello π πΈ
I am currently having a problem with null
keys in Yaml
. AFACT this is a valid Yaml
key and value:
null: null
However, the following:
auto y = yaml::Load("null: null");
y["null"] <- non-existent key 'null'
I understand that this is most likely a pilot error, but have not been able to see my mistake. So I just wanted to double check. Is this me, or is this the libraries fault?
Good question. Null does get mapped to a null object by the core schema, but I would have thought you could access it like a string key if you wanted.
Not sure why it's doing that. Happy to accept a PR.
Good question. Null does get mapped to a null object by the core schema, but I would have thought you could access it like a string key if you wanted.
Not sure why it's doing that. Happy to accept a PR.
Sweet - I'll see what I can do π