added pprint function to read json data