diff options
| author | Matthew Borkowski <matthew.h.borkowski@gmail.com> | 2021-05-13 05:11:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-13 11:11:28 +0200 |
| commit | e902c19c0e2bf7f0e9bc83b2c58d19ec024d56db (patch) | |
| tree | de1f648b1339d0c01e799d9d40e7fb602b282b8a /lib/std/json/test.zig | |
| parent | 4f71852c103f8dbf6ce78b36e5abd41a0c4ccf06 (diff) | |
| download | zig-e902c19c0e2bf7f0e9bc83b2c58d19ec024d56db.tar.gz zig-e902c19c0e2bf7f0e9bc83b2c58d19ec024d56db.zip | |
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
Diffstat (limited to 'lib/std/json/test.zig')
| -rw-r--r-- | lib/std/json/test.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/std/json/test.zig b/lib/std/json/test.zig index e37ba72113..027f6acaca 100644 --- a/lib/std/json/test.zig +++ b/lib/std/json/test.zig @@ -76,6 +76,12 @@ test "y_trailing_comma_after_empty" { ); } +test "n_object_closed_missing_value" { + try err( + \\{"a":} + ); +} + //////////////////////////////////////////////////////////////////////////////////////////////////// test "y_array_arraysWithSpaces" { |
