Skip to content

Is scientific notation number supported? #390

@Huweicai

Description

@Huweicai

It seems that the number in scientific notation will be recognized as string now:

int main() {
    const std::string yml_buf = R"(quntity: 9.5e7
quntity2: 95000000)";
    ryml::Tree tree = ryml::parse_in_arena(c4::to_csubstr(yml_buf));
    std::string str_result = ryml::emitrs_json<std::string>(tree);
    std::cout << str_result;
}

Output: {"quntity": "9.5e7","quntity2": 95000000}

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