File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1212
1313function jsontable (source)
1414 x = JSON3. read (source)
15- columnar = x isa JSON3. Object
15+ columnar = x isa JSON3. Object && first (x)[ 2 ] isa AbstractArray
1616 columnar || x isa JSON3. Array || throw (ArgumentError (" input json source is not a table" ))
1717 return Table {columnar, typeof(x)} (x)
1818end
Original file line number Diff line number Diff line change @@ -54,4 +54,15 @@ JSONTables.objecttable(io, ctable)
5454JSONTables. arraytable (io, rtable)
5555@test String (take! (io)) == rjson
5656
57+ # #7
58+ text = """ {
59+ "color_scheme": "Packages/Color Scheme - Default/Mariana.sublime-color-scheme",
60+ "dictionary": "Packages/Language - English/en_US.dic",
61+ "draw_white_space": "all",
62+ "font_face": "monospace 821",
63+ "font_size": "10",
64+ "theme": "Adaptive.sublime-theme"
65+ }"""
66+ @test_throws ArgumentError JSONTables. jsontable (text)
67+
5768end
You can’t perform that action at this time.
0 commit comments