What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-08 01:17:02
write bytes64 in json python
from base64 import b64encode from json import dumps ENCODING = 'utf-8' IMAGE_NAME = 'spam.jpg' JSON_NAME = 'output.json' # first: reading the binary stuff # note the 'rb' flag # result: bytes with open(IMAGE_NAME, 'rb') as open_file: byte_content = ... Add solution
Best helpers
Ranking is empty