encode_fiche

Function encode_fiche 

Source
pub fn encode_fiche(json: &str, minify: bool) -> Result<String, SchemaError>
Expand description

Encode JSON to fiche format: JSON → IR → fiche

Transforms JSON into a model-readable structured format using Unicode delimiters. Unlike carrier98 (opaque binary), fiche is designed for models to parse directly.

§Format

@{root}┃{field}:{type}┃{field}:{type}...
◉{value}┃{value}┃{value}...

§Example

use base_d::encode_fiche;

let json = r#"{"users":[{"id":1,"name":"alice"}]}"#;
let fiche = encode_fiche(json)?;
// @users┃id:int┃name:str
// ◉1┃alice