Skip to content

Commit f2db7b2

Browse files
author
Balaji Veeramani
committed
Update serializers.py
1 parent 57f020e commit f2db7b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sagemaker/serializers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ def serialize(self, data):
212212
if isinstance(data, str):
213213
return data
214214

215-
if isinstance(data, Iterable):
216-
return "\n".join(json.dumps(element) for element in data)
217-
218215
if hasattr(data, "read"):
219216
return data.read()
220217

218+
if isinstance(data, Iterable):
219+
return "\n".join(json.dumps(element) for element in data)
220+
221221
raise ValueError("Object of type %s is not JSON Lines serializable." % type(data))
222222

223223

0 commit comments

Comments
 (0)