struct SerializeOptions [src]
Options for serialize.
Fields
whitespace: bool = trueIf false, whitespace is omitted. Otherwise whitespace is emitted in standard Zig style.
emit_codepoint_literals: EmitCodepointLiterals = .neverDetermines when to emit Unicode code point literals as opposed to integer literals.
emit_strings_as_containers: bool = falseIf 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 = trueIf false, struct fields are not written if they are equal to their default value. Comparison
is done by std.meta.eql.
Source
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,
}