This problem occurs when we migrate Azure function from .NET6 to .NET8, route cause of this problem is in .NET8, support of using System.Text.Json has been removed and recommended way is to use using Newtonsoft.Json
Bug code - string json = JsonSerializer.Serialize(object);
New Code - string json = JsonConvert.SerializeObject<ModelType>(object);
#ernavjyot