seperated getJSON to getDict
which returns a dictionary instead of string
getJSON calls getDict and converts it into a JSON string