why not just json.dumps(sessions)?