add method for encode torrent as json