structstd.zon.stringify.SerializeOptions[src]

Options for serialize.

Fields

whitespace: bool = true

If false, whitespace is omitted. Otherwise whitespace is emitted in standard Zig style.

emit_codepoint_literals: EmitCodepointLiterals = .never

Determines when to emit Unicode code point literals as opposed to integer literals.

emit_strings_as_containers: bool = false

If true, slices of u8s, and pointers to arrays of u8 are serialized as containers. Otherwise they are serialized as string literals.

emit_default_optional_fields: bool = true

If false, struct fields are not written if they are equal to their default value. Comparison is done by std.meta.eql.

Source Code

Source code
pub const SerializeOptions = struct {
    /// If false, whitespace is omitted. Otherwise whitespace is emitted in standard Zig style.
    whitespace: bool = true,
    /// Determines when to emit Unicode code point literals as opposed to integer literals.
    emit_codepoint_literals: EmitCodepointLiterals = .never,
    /// If true, slices of `u8`s, and pointers to arrays of `u8` are serialized as containers.
    /// Otherwise they are serialized as string literals.
    emit_strings_as_containers: bool = false,
    /// If false, struct fields are not written if they are equal to their default value. Comparison
    /// is done by `std.meta.eql`.
    emit_default_optional_fields: bool = true,
}