FIX: Ensure the JSON is valid