old_contents: # -*- coding: utf-8 -*-
  
  import json
  from datetime import datetime
  
  
  class JSONEncoder(json.JSONEncoder):
      def default(self, obj):
          if isinstance(obj, datetime):
              return obj.isoformat()
          return json.JSONEncoder.default(self, obj)
  
new_contents: # -*- coding: utf-8 -*-
  
  import json
  from uuid import UUID
  from datetime import datetime
  
  
  class JSONEncoder(json.JSONEncoder):
      def default(self, obj):
          if isinstance(obj, datetime):
              return obj.isoformat()
          elif isinstance(obj, UUID):
              return str(obj)
          return json.JSONEncoder.default(self, obj)
  
subject: manage uuid object in json encoder