Skip to main content

dkit_core/
lib.rs

1//! # dkit-core
2//!
3//! Core library for **dkit** — a Swiss army knife for data format conversion and querying.
4//!
5//! This crate provides the foundational types and engines that power dkit:
6//!
7//! - [`value::Value`] — Unified data model representing JSON, CSV, YAML, TOML, and more
8//! - [`error::DkitError`] — Structured error types for parsing, writing, and querying
9//! - [`format`] — Readers and writers for 12+ data formats (JSON, CSV, YAML, TOML, XML, etc.)
10//! - [`query`] — Query engine with path navigation, filtering, sorting, and built-in functions
11//!
12//! ## Quick Start
13//!
14//! ```rust
15//! use dkit_core::format::FormatReader;
16//! use dkit_core::format::json::JsonReader;
17//!
18//! let json = r#"{"name": "Alice", "age": 30}"#;
19//! let reader = JsonReader;
20//! let value = reader.read(json).unwrap();
21//! ```
22
23/// Core error types for format parsing, writing, and query evaluation.
24pub mod error;
25
26/// Data format readers and writers.
27///
28/// Supported formats: JSON, JSON Lines, CSV/TSV, YAML, TOML, XML, MessagePack,
29/// Excel (xlsx, read-only), SQLite (read-only), Apache Parquet, Markdown (write-only),
30/// HTML (write-only).
31pub mod format;
32
33/// Query engine: parser, evaluator, filter operations, and built-in functions.
34pub mod query;
35
36/// Unified data model — the `Value` enum that all formats convert to and from.
37pub mod value;