Skip to main content

tabnas_alchemy/shared/
json.rs

1//! The JSON profile: the options render's `JsonRenderer` takes, which
2//! alchemy hands to [`Renderers::json`](crate::shared::Renderers::json).
3
4/// The JSON profile.
5#[derive(Clone, Debug, Default, PartialEq, Eq)]
6pub struct JsonOptions {
7    /// Spaces per nesting level, with a newline before every item and
8    /// every closing bracket of a non-empty container. `None` or `Some(0)`
9    /// is compact: no whitespace at all.
10    pub indent: Option<usize>,
11    /// Write a newline after the root value, at `End`.
12    pub trailing_newline: bool,
13}