Skip to content

Commit e5e433b

Browse files
author
George Garber
committed
except strings
1 parent d6c2c88 commit e5e433b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/serialization/json/kiota_serialization_json/json_parse_node.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ def get_bytes_value(self) -> Optional[bytes]:
233233
Returns:
234234
bytearray: The bytearray value from the nodes
235235
"""
236-
if isinstance(self._json_node, list) or isinstance(self._json_node, dict):
237-
base64_string = json.dumps(self._json_node)
236+
if isinstance(self._json_node, str)
237+
base64_string = self._json_node
238238
else:
239-
base64_string = str(self._json_node)
239+
base64_string = json.dumps(self._json_node)
240240
if not base64_string:
241241
return None
242242
return base64_string.encode("utf-8")

0 commit comments

Comments
 (0)