schemaui 0.7.2

A Rust library for generating TUI and Web UIs from JSON Schemas for configuration management.
Documentation
1
2
3
4
5
6
7
8
use anyhow::{Context, Result};
use schemars::schema::RootSchema;
use serde_json::Value;

/// Deserialize a JSON value into a `RootSchema`.
pub fn load_root_schema(value: &Value) -> Result<RootSchema> {
    serde_json::from_value(value.clone()).context("schema is not a valid JSON Schema document")
}