1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Serialization module for converting Akari Values to various formats
//!
//! This module provides the `ValueSerializer` trait and its implementations for
//! serializing Akari's `Value` type into different output formats (JSON, YAML, etc.).
//!
//! # Architecture
//!
//! The serializer system is the inverse of the parser system:
//! - **Parser**: External format → Akari Value
//! - **Serializer**: Akari Value → External format
//!
//! # Module Structure
//!
//! ```text
//! serializer/
//! ├── mod.rs # Module exports
//! ├── trait_def.rs # ValueSerializer<T> trait definition
//! └── json.rs # JsonSerializer implementation (future)
//! ```
//!
//! # Trait Design
//!
//! `ValueSerializer<O>` intentionally stays minimal:
//! - `serialize_one(&Value) -> Output` for owned one-shot serialization
//! - `serialize_to(&Value, &mut impl Write)` for streaming to writers
//!
//! This keeps parser/serializer APIs conceptually aligned while avoiding forced
//! stateful serializer machinery where it is not needed.
// Re-export the trait and error types
pub use ValueSerializer;
pub use ;
pub use BinWriter;
pub use JsonSerializer;