We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6c2c88 commit e5e433bCopy full SHA for e5e433b
packages/serialization/json/kiota_serialization_json/json_parse_node.py
@@ -233,10 +233,10 @@ def get_bytes_value(self) -> Optional[bytes]:
233
Returns:
234
bytearray: The bytearray value from the nodes
235
"""
236
- if isinstance(self._json_node, list) or isinstance(self._json_node, dict):
237
- base64_string = json.dumps(self._json_node)
+ if isinstance(self._json_node, str)
+ base64_string = self._json_node
238
else:
239
- base64_string = str(self._json_node)
+ base64_string = json.dumps(self._json_node)
240
if not base64_string:
241
return None
242
return base64_string.encode("utf-8")
0 commit comments