Skip to content

Deserializing an empty string should not throw #480

@Delian0

Description

@Delian0
auto tree = ryml::parse_in_arena("a: ''");
std::string emptyString;
tree["a"] >> emptyString; //throws

According to the standard, if I'm understanding it correctly, empty nodes should be interpreted as null, unless you're deserializing into a string, in which case they should be interpreted as 0-length (but not null) strings. This means that when deserializing a node into a ryml::csubstr or std::string, a 0-length scalar is a valid 0-length string value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions