Fix #64 detection of array of objects (inline tables)

A string can contain '{', so "{ in s" is not a good enough test of
whether something is an inline table.
This commit is contained in:
Thomas Kluyver 2016-11-23 17:13:33 +00:00 committed by Uiri
parent 4820abe8d0
commit c45b5ff79e
1 changed files with 1 additions and 1 deletions

View File

@ -558,7 +558,7 @@ def _load_array(a):
tmpa = a[1:-1].strip()
if tmpa != '' and tmpa[0] == '"':
strarray = True
if '{' not in a[1:-1]:
if not a[1:-1].strip().startswith('{'):
a = a[1:-1].split(',')
else:
# a is an inline object, we must find the matching parenthesis to difine groups