title: Unexpected character encountered while parsing value in azure durable function
body: <p>I have a problem with the <code>CallActivityAsync</code> function, I am trying to pass the value (<a href="https://www.web.eu/a?b=0123456789" rel="nofollow noreferrer">https://www.web.eu/a?b=0123456789</a>) to <code>ActivityTrigger</code> (to <code>GetWebContent</code>) and I still get the error:</p>
  
  <blockquote>
    <p><strong>Unexpected character encountered while parsing value: {. Path '', line 1, position 1</strong>.  </p>
  </blockquote>
  
  <p>I do not know what's going on. I send via Postman <code>"0123456789"</code> the value and the next value is combined with URL. The value passed is a plain string. Could someone tell me what's going on? Where is the problem?</p>
  
  <pre><code>This exception was originally thrown at this call stack:
      Newtonsoft.Json.JsonTextReader.ReadStringValue(Newtonsoft.Json.ReadType)
      Newtonsoft.Json.JsonTextReader.ReadAsString()
      Newtonsoft.Json.JsonReader.ReadForType(Newtonsoft.Json.Serialization.JsonContract, bool)
      Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Newtonsoft.Json.JsonReader, System.Type, bool)
      Newtonsoft.Json.JsonSerializer.DeserializeInternal(Newtonsoft.Json.JsonReader, System.Type)
      Newtonsoft.Json.JsonSerializer.Deserialize(Newtonsoft.Json.JsonReader, System.Type)
      DurableTask.Core.Serializing.JsonDataConverter.Deserialize(string, System.Type) in JsonDataConverter.cs
      DurableTask.Core.TaskOrchestrationContext.ScheduleTaskInternal(string, string, string, System.Type, object[]) in TaskOrchestrationContext.cs
      System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
      ...
      [Call Stack Truncated]
  </code></pre>
  
  <pre><code>[FunctionName(nameof(DurableHttpStart))]
      public async Task&lt;HttpResponseMessage&gt; Run(
          [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "{functionName}")]
          HttpRequestMessage requestMessage,
          [DurableClient] IDurableClient durableClient,
          string functionName,
          ILogger logger)
      {
          var input = await requestMessage.Content.ReadAsAsync&lt;object&gt;();
  
          var instanceId = await durableClient.StartNewAsync(functionName, input);
  
          logger.LogInformation($"Started orchestration with ID = '{instanceId}'.");
  
          return durableClient.CreateCheckStatusResponse(requestMessage, instanceId);
      }
  
  [FunctionName("Parse")]
      public async Task&lt;IActionResult&gt; Run([OrchestrationTrigger] IDurableOrchestrationContext context, ILogger log)
      {
          try
          {
              log.LogInformation("C# HTTP trigger function processed a request.");
  
              var value = context.GetInput&lt;string&gt;();
  
              var result = new Result();
  
              var link = await context.CallActivityAsync&lt;string&gt;(nameof(GetLink), value);
              result.Url = link;
  
              var webContent = await context.CallActivityAsync&lt;string&gt;(nameof(GetWebContent), link);
  
              var parsedContent = await context.CallActivityAsync&lt;string&gt;(nameof(RunParser), webContent);
              result.Data = parsedContent;
  
              return new OkObjectResult(result);
          }
          catch (Exception e)
          {
              Console.WriteLine(e);
              throw;
          }
      }
  
  [FunctionName("GetLink")]
      public static async Task&lt;string&gt; Run(
          [ActivityTrigger] string value,
          ILogger log)
      {
          var url = LinkHelper.CreateLink(value);
  
          return url;
      }
  
  
  [FunctionName("GetWebContent")]
      public static async Task&lt;IActionResult&gt; Run(
          [ActivityTrigger] string url,
          ILogger log)
      {
          log.LogInformation("C# 'GetWebContent' HTTP trigger function processed a request.");
  
          log.LogInformation($"Url from request body: {url}");
  
          var content = await HttpHelper.GetWebPageSource(url);
  
          return content != null ? (IActionResult) new OkObjectResult(content) : new BadRequestObjectResult($"Provided url: {url} is bad. Try again later.");
      }
  </code></pre>