getJson function of the Error Class