pecto-core 0.1.1

Core behavior spec model and analysis framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::model::ProjectSpec;

/// Serialize a ProjectSpec to YAML.
pub fn to_yaml(spec: &ProjectSpec) -> Result<String, serde_yaml::Error> {
    serde_yaml::to_string(spec)
}

/// Serialize a ProjectSpec to JSON.
pub fn to_json(spec: &ProjectSpec) -> Result<String, serde_json::Error> {
    serde_json::to_string_pretty(spec)
}