Skip to content

Commit abd1399

Browse files
committed
Don't check depth at the end (unnecessary check)
1 parent 57eba21 commit abd1399

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/generic/stage2/json_iterator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code json_iterator::walk_docum
188188

189189
dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]);
190190

191-
if (depth != 0) { log_error("Unclosed objects or arrays!"); return TAPE_ERROR; }
192-
193191
// If we didn't make it to the end, it's an error
194192
if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) {
195193
log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!");

0 commit comments

Comments
 (0)