Actually fixes the json with validation.