Skip to main content

Crate jasn_core

Crate jasn_core 

Source
Expand description

Core data types for JASN and JAML serialization formats.

This crate provides the shared data model used by both JASN (JSON5-like) and JAML (YAML-like) serialization formats. Both formats share the same type system and in-memory representation.

§Data Model

use std::collections::BTreeMap;
use jasn_core::Value;

let mut map = BTreeMap::new();
map.insert("name".to_string(), Value::String("Alice".to_string()));
map.insert("age".to_string(), Value::Int(30));

let value = Value::Map(map);

§Features

  • serde (default): Enable serde serialization/deserialization support

Modules§

de
Serde deserialization support for Value.
ser
Serde serialization support for Value.

Structs§

Binary
A wrapper for Vec<u8>… at least until Rust supports specialization.

Enums§

Value
Represents a valid JASN value.

Type Aliases§

Timestamp
Type alias for timestamps (RFC3339/ISO8601 compatible).