added pretty flag to json object