-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.0.2
-
Component/s: Shell
-
None
-
Environment:OSX
-
ALL
Whereas usually you can start typing an object, e.g.:
> object = { ... "a": "b", ... "c": "d" ... }; { "a" : "b", "c" : "d" } >
the same breaks when you try to do so with an array - with the square bracket on its own.
> array = [ Wed Aug 8 15:15:08 SyntaxError: syntax error (shell):1
It works when there's something after the square bracket, e,g.:
> array = ["a", ... "b"] [ "a", "b" ]
or:
> array = [{ ... "a":"b", ... }] [ { "a" : "b" } ]
And fails when the remainder is concluded without the square bracket on the same line:
> array = [{ ... "a":"b" ... } Wed Aug 8 15:17:40 SyntaxError: missing ] after element list (shell):3
This only happens on the top level, as demonstrated using a nested array:
> array = [{ ... "a":[ ... "a" ... ] ... }] [ { "a" : [ "a" ] } ]
I think this is to do with the V8 engine but don't really know.
- duplicates
-
SERVER-6693 Copy-pasting multi-line strings with arrays does not work in shell
- Closed