I would like to select a json file and parse it to an object before sending it to api call for validation. Below code is failing sending the formData. The api is expecting an object.
<label class="form-label required" for="file">File</label>
<label
    class="button secondary wide required"
    for="file"
    (click)="inputFileTarget.click()"
>
    Select JSON file
</label>
<input
    id="inputFileTarget"
    #inputFileTarget
    type="file"
    class="hidden"
    accept=".json"
    formControlName="fileInput"
    (change)="onFileChange($event)"
/>
component:
    const formData = new FormData();
    formData.append('file', this.importForm.get('fileSource').value);
    this.wizard.next();
    this.validateUploadedTemplate(formData);
private validateUploadedTemplate(formData: any): void {
    this.templateUploadService.validate(formData)
    .subscribe(result => {
        console.log('result', result);
    })
}
[HttpPost]
    [ResponseType(typeof(Boolean))]
    [Route("validate-definition", Name = "ValidateAuditTemplate")]
    [RequiredActivity(RadarModuleKeys.EnhancedAudits, EnhancedAuditActivities.ManageEnhancedAudits)]
    public async Task<IHttpActionResult> ValidateAuditTemplate(TemplateDefinition template)
    {
        return Ok(await Task.FromResult(true));
    }
 
    