code: def json(self):
          
          output = {}
          for filename in self.data:
              output[filename] = []
  
              for secret_hash in self.data[filename]:
                  tmp = self.data[filename][secret_hash].json()
                  del tmp['filename']  # Because filename will map to the secrets
  
                  output[filename].append(tmp)
  
          return output
docs: Custom JSON encoder