Skip to content

Commit 8255cd0

Browse files
author
Kevin Kuhl
authored
Fix for #17200
Attempt to decode the bytes array with `encoding` passed to the call.
1 parent 3c833db commit 8255cd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/io/json/json.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ def read_json(path_or_buf=None, orient=None, typ='frame', dtype=True,
346346
if lines:
347347
# If given a json lines file, we break the string into lines, add
348348
# commas and put it in a json list to make a valid json object.
349-
lines = list(StringIO(json.strip()))
349+
enc = encoding if encoding else 'utf-8'
350+
lines = list(StringIO(json.decode(enc).strip()))
350351
json = '[' + ','.join(lines) + ']'
351352

352353
obj = None

0 commit comments

Comments
 (0)