fktn-k / fkYAML

A C++ header-only YAML library
MIT License
67 stars 7 forks source link

Incorrect parse result from plain scalars starting with special values #277

Closed fktn-k closed 7 months ago

fktn-k commented 7 months ago

Description

The parser cannot generate a correct node tree starting with special values like true, null, for example, a nullValue scalar or a false_positive scalar.

Reproduction steps

Try parse the following YAML document:

nullValue: null

Expected vs. actual results

The parser must produce the following key-value pair from the YAML document shown in the "Reproduction steps".

nullValue: null

However, the following node tree is generated actually:

null:
  Value: null

Minimal code example

#include <iostream>
#include <fkYAML/node.hpp>

int main() {
    fkyaml::node node = fkyaml::node::deserialize("nullValue: null");
    std::cout << node << std::endl;
}

Error messages

No error messages.

Compiler and operating system

GCC 11.4.0 on Ubuntu 22.04 LTS

Library version

develop HEAD

Validation

fktn-k commented 7 months ago

fixed in the PR #278.