We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Parser
yaml-rust parses empty scalar as ~:
yaml-rust
~
use yaml_rust::parser::{Event, EventReceiver, Parser}; struct Printer; impl EventReceiver for Printer { fn on_event(&mut self, ev: Event) { println!("{:?}", ev); } } let text: &str = r#" foo: bar: ~ "# Parser::new(text.chars()).load(&mut Recv, false)?; /* output: StreamStart DocumentStart MappingStart(0) Scalar("foo", Plain, 0, None) Scalar("~", Plain, 0, None) Scalar("bar", Plain, 0, None) Scalar("~", Plain, 0, None) MappingEnd DocumentEnd */
while libyaml's yaml_parser_parse does not (I did FFI by myself):
libyaml
yaml_parser_parse
StreamStart DocumentStart MappingStart { anchor: None } Scalar { anchor: None, value: "foo" } Scalar { anchor: None, value: "" } Scalar { anchor: None, value: "bar" } Scalar { anchor: None, value: "~" } MappingEnd DocumentEnd StreamEnd
Note: tag:yaml.org,2002:null is not in Failsafe schema1 (and is in JSON schema2).
tag:yaml.org,2002:null
https://yaml.org/spec/1.2.2/#101-failsafe-schema ↩
https://yaml.org/spec/1.2.2/#102-json-schema ↩
The text was updated successfully, but these errors were encountered:
Made test case for this: #183
Sorry, something went wrong.
No branches or pull requests
yaml-rust
parses empty scalar as~
:while
libyaml
'syaml_parser_parse
does not (I did FFI by myself):Note:
tag:yaml.org,2002:null
is not in Failsafe schema1 (and is in JSON schema2).Footnotes
https://yaml.org/spec/1.2.2/#101-failsafe-schema ↩
https://yaml.org/spec/1.2.2/#102-json-schema ↩
The text was updated successfully, but these errors were encountered: