MCPcopy
hub / github.com/aws/aws-cli / _encode

Method _encode

awscli/botocore/paginate.py:70–79  ·  view source on GitHub ↗

Encode bytes in given data, keeping track of the path traversed.

(self, data, path)

Source from the content-addressed store, hash-verified

68 return base64.b64encode(json_string.encode('utf-8')).decode('utf-8')
69
70 def _encode(self, data, path):
71 """Encode bytes in given data, keeping track of the path traversed."""
72 if isinstance(data, dict):
73 return self._encode_dict(data, path)
74 elif isinstance(data, list):
75 return self._encode_list(data, path)
76 elif isinstance(data, bytes):
77 return self._encode_bytes(data, path)
78 else:
79 return data, []
80
81 def _encode_list(self, data, path):
82 """Encode any bytes in a list, noting the index of what is encoded."""

Callers 3

encodeMethod · 0.95
_encode_listMethod · 0.95
_encode_dictMethod · 0.95

Calls 3

_encode_dictMethod · 0.95
_encode_listMethod · 0.95
_encode_bytesMethod · 0.95

Tested by

no test coverage detected