ParseOptions
Controls how to deal with various inconsistencies between the JSON document and the Zig struct type passed in. For duplicate fields or unknown fields, set options in this struct. For missing fields, give the Zig struct fields default values.
Fields of this type
Fields
- duplicate_field_behavior:enum { use_first, @"error", use_last, }
- Behaviour when a duplicate field is encountered.
- ignore_unknown_fields:bool
- If false, finding an unknown field returns `error.UnknownField`.
- max_value_len:?usize
- Passed to `std.json.Scanner.nextAllocMax` or `std.json.Reader.nextAllocMax`.
- allocate:?AllocWhen
- This determines whether strings should always be copied,
- parse_numbers:bool
- When parsing to a `std.json.Value`, set this option to false to always emit