std/json: Fix premature closing brace being considered valid JSON

return error from StreamingParser when reading closing brace when expecting value for an object key
This commit is contained in:
Matthew Borkowski
2021-05-13 05:11:28 -04:00
committed by GitHub
parent 4f71852c10
commit e902c19c0e
2 changed files with 14 additions and 1 deletions

View File

@@ -76,6 +76,12 @@ test "y_trailing_comma_after_empty" {
);
}
test "n_object_closed_missing_value" {
try err(
\\{"a":}
);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
test "y_array_arraysWithSpaces" {