diff --git a/src/parser.zig b/src/parser.zig index 8a337f5..bbf0a62 100644 --- a/src/parser.zig +++ b/src/parser.zig @@ -50,7 +50,7 @@ pub const Options = struct { // If an empty document is parsed, this defines what value type should be the // resulting document root object. The default behavior is to emit an error if the // document is empty. - default_object: enum { string, list, map, fail } = .fail, + default_object: enum { scalar, list, map, fail } = .fail, // Only used by the parseTo family of functions. // If false, and a mapping contains additional keys that do not map to the fields of diff --git a/src/parser/state.zig b/src/parser/state.zig index 044d6e8..69cfd2f 100644 --- a/src/parser/state.zig +++ b/src/parser/state.zig @@ -59,7 +59,7 @@ pub const State = struct { switch (state.mode) { .initial => switch (options.default_object) { - .string => state.document.root = Value.emptyString(), + .scalar => state.document.root = Value.emptyScalar(), .list => state.document.root = Value.newList(arena_alloc), .map => state.document.root = Value.newMap(arena_alloc), .fail => {