Add ended to json.