Skip to content

fix comma in value issue #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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