This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.
pubconstOptions = struct {
/// Controls the whitespace emitted./// The default `.minified` is a compact encoding with no whitespace between tokens./// Any setting other than `.minified` will use newlines, indentation, and a space after each ':'./// `.indent_1` means 1 space for each indentation level, `.indent_2` means 2 spaces, etc./// `.indent_tab` uses a tab for each indentation level.whitespace: enum {
minified,
indent_1,
indent_2,
indent_3,
indent_4,
indent_8,
indent_tab,
} = .minified,
/// Should optional fields with null value be written?emit_null_optional_fields: bool = true,
/// Arrays/slices of u8 are typically encoded as JSON strings./// This option emits them as arrays of numbers instead./// Does not affect calls to `objectField*()`.emit_strings_as_arrays: bool = false,
/// Should unicode characters be escaped in strings?escape_unicode: bool = false,
/// When true, renders numbers outside the range `+-1<<53` (the precise integer range of f64) as JSON strings in base 10.emit_nonportable_numbers_as_strings: bool = false,
}