-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error when emitting to JSON from a YAML versioning scheme value #292
Comments
@jppm I'm getting an unquoted versioning for Working versioning:
|
That's odd. It succeeds with this: TEST(emit_json, issue292)
{
EXPECT_FALSE(csubstr("0.0.0").is_number());
EXPECT_FALSE(csubstr("0.1.0").is_number());
EXPECT_FALSE(csubstr("0.6.1").is_number());
EXPECT_FALSE(csubstr("1.1.9").is_number());
EXPECT_FALSE(csubstr("1.2.3").is_number());
Tree t = parse_in_arena("{}");
t["james"] = "0.0.0";
EXPECT_EQ(emitrs_json<std::string>(t), "{\"james\": \"0.0.0\"}");
t["james"] = "0.1.0";
EXPECT_EQ(emitrs_json<std::string>(t), "{\"james\": \"0.1.0\"}");
t["james"] = "0.6.1";
EXPECT_EQ(emitrs_json<std::string>(t), "{\"james\": \"0.6.1\"}");
t["james"] = "1.1.9";
EXPECT_EQ(emitrs_json<std::string>(t), "{\"james\": \"1.1.9\"}");
t["james"] = "1.2.3";
EXPECT_EQ(emitrs_json<std::string>(t), "{\"james\": \"1.2.3\"}");
} Are you sure you have the latest version? |
Latest version with rapidyaml. Does fetching rapidyaml through git also fetches the submodules ? EDIT : sorry you are right, I screwed something with the c4 lib on my end. |
Forgot to update with |
Emitting a JSON file from a YAML with versioning value will give a SyntaxError when parsed in JSON.
YAML
JSON
The versioning conversion to a double should not have passed (just a hypothesis).
The text was updated successfully, but these errors were encountered: