Crate ison_rs

Crate ison_rs 

Source
Expand description

§ISON Parser for Rust

A Rust implementation of the ISON (Interchange Simple Object Notation) parser. ISON is a minimal, LLM-friendly data serialization format optimized for AI/ML workflows.

§Quick Start

use ison_rs::{parse, dumps, Value};

let ison_text = r#"
table.users
id name email
1 Alice alice@example.com
2 Bob bob@example.com
"#;

let doc = parse(ison_text).unwrap();
let users = doc.get("users").unwrap();

for row in &users.rows {
    println!("{}: {}", row.get("id").unwrap(), row.get("name").unwrap());
}

// Serialize back
let output = dumps(&doc, true);

Modules§

plugins
ISON Plugins

Structs§

Block
A block of structured data
Document
A complete ISON document
FieldInfo
Field information including optional type annotation
ISONError
Errors that can occur during ISON parsing
Reference
Reference to another record in the document

Enums§

Value
Value types in ISON

Constants§

VERSION

Functions§

dumps
Serialize a Document to an ISON string
dumps_isonl
Serialize to ISONL format
dumps_with_delimiter
Serialize a Document to an ISON string with custom delimiter
ison_to_isonl
Convert ISON text to ISONL text
ison_to_json
Convert ISON to JSON format (requires serde feature)
isonl_to_ison
Convert ISONL text to ISON text
json_to_ison
Convert JSON to ISON format (requires serde feature)
loads
Parse an ISON string into a Document (alias for parse)
loads_isonl
Parse ISONL string (alias for parse_isonl)
parse
Parse an ISON string into a Document
parse_isonl
Parse ISONL format

Type Aliases§

Result
Row
A row of data (field name -> value mapping)