Skip to content

Instantly share code, notes, and snippets.

@tarquin-the-brave
Created May 12, 2020 11:55
Show Gist options
  • Save tarquin-the-brave/845aaa7b507a22ab5e7d4ec4a6c86a87 to your computer and use it in GitHub Desktop.
Save tarquin-the-brave/845aaa7b507a22ab5e7d4ec4a6c86a87 to your computer and use it in GitHub Desktop.
let json_schema = serde_json::from_str::<schemars::schema::RootSchema>(
&std::fs::read_to_string("example.schema.json")?,
)?;
let json_schema_from_yaml = serde_yaml::from_str::<schemars::schema::RootSchema>(
&std::fs::read_to_string("example.schema.yaml")?,
)?;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment