title: Deserialize JSON string that supposed for object as string
body: <p>I need to serialize a string of JSON. But inside this string, it contains objects that I want to serialize as a string.</p>
  <p>Look at this JSON string</p>
  <pre><code>{
      &quot;action&quot;:&quot;applyPromo&quot;,
      &quot;params&quot;:
      [
          {
              &quot;transacId&quot;:&quot;M123238831&quot;,
              &quot;promotionId&quot;:16,
              &quot;promotionTypeId&quot;:1,
              &quot;amount&quot;:100,
              &quot;transacTime&quot;:&quot;2021-03-19T12:00:30.045+10:00&quot;
          }
      ]
  }
  </code></pre>
  <p>Since the action can be anything, I need to store the <strong>params</strong> as a string which will be deserialized elsewhere.</p>
  <p>Here is my class:</p>
  <pre><code>public class RequestAction
  {
      public string action { get; set; }
      public string params { get; set; }
  
      public RequestAction()
      {
          action = params = string.Empty;
      }
  }
  </code></pre>
  <p>When I tried to deserialize the string using JSON (Newtonsoft), I got this error: <code>Unexpected character encountered while parsing value: [. Path 'params', line 1, position 27.'</code>.</p>
  <p>Here is my code to deserialize the JSON String</p>
  <pre><code>public static RequestAction Parse(str)
  {
      return JsonConvert.DeserializeObject&lt;RequestAction&gt;(str);
  }
  </code></pre>
  <p>Any idea how to deserialize <code>params</code> as string?</p>