I use Rider to create a new Azure Function by template, TimerTrigger based, almost everything by default, but got "System.Text.Json: The input does not contain any JSON tokens." The code is
using System;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
namespace Company.FunctionApp2;
public static class timeFunc
{
[FunctionName("timeFunc")]
public static async Task RunAsync([TimerTrigger("0 */5 * * * *")] TimerInfo myTimer, ILogger log)
{
log.LogInformation($"C# Timer trigger function executed at: {DateTime.UtcNow}");
}
}
And the error is
[2023-10-16T01:38:50.051Z] The listener for function 'timeFunc' was unable to start.
[2023-10-16T01:38:50.054Z] The listener for function 'timeFunc' was unable to start.System.Text.Json: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
local.settings.json is
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
it's weird that this function doesn't even use "System.Text.Json". Can anyone offer some help, thanks a lot
Btw, I created another HTTPTrigger function, which works


