title: TypeError: Object of type bytes is not JSON serializable - python 3 - try to post base64 image data
body: <p>i received this error after try convert data to json to post request</p>
  <blockquote>
  <p>TypeError: Object of type 'bytes' is not JSON serializable</p>
  </blockquote>
  <p>my code</p>
  <pre><code>dict_data: dict = {
    'img': base64.b64encode(urlopen(obj['recognition_image_path']).read())
  }
  json_data: str = json.dumps(dict_data)
  </code></pre>
  <p>i read image from url, convert it to base64, after i received error when try convert data to json.
  Please help</p>