Skip to main content

json_schema

Function json_schema 

Source
pub fn json_schema() -> Schema
Expand description

Returns the JSON Schema of the IR file format.

Requires the schema feature. Serialize the result with serde_json to get the schema document.

ยงExamples

let schema = imping_ir::json_schema();
let text = serde_json::to_string_pretty(&schema)?;
assert!(text.contains("format_version"));