Skip to content

Document why Object/Null tera values are dropped in answers serialization #110

Description

@raiderrobert

Context

In src/answers/mod.rs (lines 149-166), tera_value_to_toml silently drops Object and Null values:

fn tera_value_to_toml(value: &Value) -> Option<toml::Value> {
    match value {
        ...
        _ => None, // Silently drops Object and Null
    }
}

This is likely intentional since TOML tables would complicate the flat [variables] section, but there's no documentation explaining the choice.

Suggestion

Add a doc comment or inline comment explaining the intentional omission, and optionally emit a debug log when values are dropped so template authors can understand why certain variables don't appear in the answers file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions