Expand description
Format a Value into JAML text.
The main entry point is format() for standard use cases.
For custom formatting options, use format_with_opts() with Options.
use jaml::{Value, format};
let value = Value::String("hello".to_string());
assert_eq!(format(&value), "\"hello\"");
// Custom formatting with advanced options
use jaml::formatter::{Options, format_with_opts};
let opts = Options::new().with_sort_keys(false);
let formatted = format_with_opts(&value, &opts);Structs§
- Options
- Formatting options for JAML output.
Enums§
- Binary
Encoding - Binary data encoding preference.
- Quote
Style - Quote style for strings and map keys.
- Timestamp
Precision - Precision for timestamp fractional seconds.
Functions§
- format
- Formats a JAML
Valueinto an indentation-based string. - format_
with_ opts - Formats a JAML
Valuewith custom formatting options.