Use json in debug log instead of a dict