Skip to content

Instantly share code, notes, and snippets.

@tarquin-the-brave
Created May 12, 2020 11:51
Show Gist options
  • Save tarquin-the-brave/40e7a7b07b81626f8b7a4595a846064a to your computer and use it in GitHub Desktop.
Save tarquin-the-brave/40e7a7b07b81626f8b7a4595a846064a to your computer and use it in GitHub Desktop.
let some_yaml = r#"
[5,6]: true
"#;
let try_yaml = serde_yaml::from_str::<serde_yaml::Value>(some_yaml);
let try_json = serde_yaml::from_str::<serde_json::Value>(some_yaml);
assert!(try_yaml.is_ok());
assert!(try_json.is_err());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment