Estou tentando renderizar application/ld+json no componente .NET MAUI, mas ele está renderizando vazio.
<script type="application/ld+json">
@{
getBannerSeoText();
}
</script>
@code {
private string getBannerSeoText()
{
string carouselText = "";
using (HttpClient client = new HttpClient())
{
var hostUrl = $"{httpContextAccessor.HttpContext.Request.Scheme}://{httpContextAccessor.HttpContext.Request.Host}";
string fileUrl = $"{hostUrl}/{utilityService.GetSeoFolderUrl()}/carousal.json";
carouselText = Task.Run(async () => await client.GetStringAsync(fileUrl)).Result;
}
return carouselText;
}
}