Skip to content

Commit

Permalink
Merge pull request #3 from bablokb/main
Browse files Browse the repository at this point in the history
fix comma in value issue
  • Loading branch information
tannewt authored Feb 29, 2024
2 parents 8ba2a64 + fed2d27 commit 0a6ba7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_json_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def next_value(self, endswith=None):
char = self.read()
except EOFError:
char = endswith
if char == endswith or (not in_string and char in (ord("]"), ord("}"))):
if not in_string and (char == endswith or char in (ord("]"), ord("}"))):
if len(buf) == 0:
return None
value_string = bytes(buf).decode("utf-8")
# print(repr(value_string))
# print(f"{repr(value_string)}, {endswith=}")
return json.loads(value_string)
if char == ord("{"):
return TransientObject(self)
Expand Down

0 comments on commit 0a6ba7f

Please sign in to comment.