patch 8.0.0166: JSON with a duplicate key gives an internal error
Problem: JSON with a duplicate key gives an internal error. (Lcd)
Solution: Give a normal error. Avoid an error when parsing JSON from a
remote client fails.
diff --git a/src/testdir/test_json.vim b/src/testdir/test_json.vim
index e149036..ecca038 100644
--- a/src/testdir/test_json.vim
+++ b/src/testdir/test_json.vim
@@ -148,8 +148,9 @@
call assert_fails('call json_decode("\"")', "E474:")
call assert_fails('call json_decode("blah")', "E474:")
- call assert_fails('call json_decode("true blah")', "E474:")
+ call assert_fails('call json_decode("true blah")', "E488:")
call assert_fails('call json_decode("<foobar>")', "E474:")
+ call assert_fails('call json_decode("{\"a\":1,\"a\":2}")', "E937:")
call assert_fails('call json_decode("{")', "E474:")
call assert_fails('call json_decode("{foobar}")', "E474:")