Add reading from json file to calculate d-index.