<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>BioErrorLog</author_name>
  <author_url>https://blog.hatena.ne.jp/BioErrorLog/</author_url>
  <blog_title>BioErrorLog Tech Blog</blog_title>
  <blog_url>https://www.bioerrorlog.work/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>boto3</anon>
    <anon>AWS SDK</anon>
    <anon>AWS</anon>
  </categories>
  <description>Pythonのjsonモジュールを利用してjson変換する際に発生した、下記のエラーの対処法をまとめます。 &quot;Object of type datetime is not JSON serializable&quot; はじめに 背景 対処法 前提: defaultパラメータ 対処法１：string変換 対処法２：カスタム変換 おわりに 参考 はじめに jsonモジュールを使うと、Python上でjsonを扱うことが出来ます。 しかし、json対応されていない形式は、そのままでは扱うことが出来ません。 今回、datetime形式が含まれたデータをjson変換しようとした際、以下のエラーに遭遇しました。 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.bioerrorlog.work%2Fentry%2Fpython-datetime-not-json-serializable-error&quot; title=&quot;エラー対処: Object of type datetime is not JSON serializable | Python - BioErrorLog Tech Blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/B/BioErrorLog/20201213/20201213183728.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-12-13 18:39:56</published>
  <title>エラー対処: Object of type datetime is not JSON serializable | Python</title>
  <type>rich</type>
  <url>https://www.bioerrorlog.work/entry/python-datetime-not-json-serializable-error</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
