json_spanned_value/
settings.rs

1/// Deserialization/parsing settings
2#[derive(Clone, Copy, Debug)]
3pub struct Settings {
4    /// Allow duplicate JSON object/map keys when deserializing [Map](crate::Map)s, such as: `{"a": 1, "a": 2}`.  Only one value will be retained.<br>
5    /// **default: false**
6    pub allow_duplicate_keys: bool,
7
8    /// Allow trailing commas when deserializing an array such as `[1, 2, 3,]` or object such as `{"a", 1, "b": 2,}`.
9    pub allow_trailing_comma: bool,
10
11    /// Allow `// single line` or `/* block */` comments.
12    pub allow_comments: bool,
13
14    #[doc(hidden)] pub _non_exhaustive: ()
15}
16
17impl Default for Settings {
18    fn default() -> Self {
19        Self {
20            allow_duplicate_keys:   false,
21            allow_trailing_comma:   false,
22            allow_comments:         false,
23
24            _non_exhaustive:        ()
25        }
26    }
27}