title: Passing JSON to EXE file yields "newtonsoft.Json.JsonReaderException: 'Unexpected character encountered while parsing value"
body: <p>I have an exe file which gets started with a parameter by another method.</p>
  
  <p>My exe file's main method is in my <code>program</code> class which looks like this:</p>
  
  <pre><code>static void Main(String[] args)
      {
  
          Application.Run(new PAMain(args[0])); //args[0] is the parameter
  
      } 
  </code></pre>
  
  <p>I get the sent parameter by calling args[0], which is the JSON data.</p>
  
  <p>Notice the other class <code>new PAMain</code> where I pass this args[0] to its constructor which looks like this:</p>
  
  <pre><code>    public PAMain(string json)
      {
          InitializeComponent();       
  
          SetJsonData(json);          
  
      }
  </code></pre>
  
  <p>The <code>SetJsonData()</code> method deserializes the json string, which is where the error happens, the<code>SetJsonData()</code> method looks like this:</p>
  
  <pre><code>string jsonData;
  private AsanaRootData root = new AsanaRootData();
  
  public string SetJsonData(string json)
  {
     this.jsonData = json;          
  
     root = JsonConvert.DeserializeObject&lt;AsanaRootData&gt;(jsonData);  //The error happens here          
  
     return json;
  }
  </code></pre>
  
  <p>The error happens at <code>"root =..."</code>.
  The error I get is <code>newtonsoft.Json.JsonReaderException: 'Unexpected character encountered while parsing value ... at line ...</code></p>
  
  <p>If I call the <code>SetJsonData()</code> method on the original JSON data and not the exe passed one, everything works. So I think that the error itself is that maybe after passing the JSON data to the exe file and calling args[0] the data is not JSON anymore?</p>
  
  <p>Here is the error popup in my GUI:</p>
  
  <p><a href="https://i.stack.imgur.com/o9d2v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o9d2v.png" alt="enter image description here"></a></p>
  
  <p>The error happens after <code>assignee_status:</code> at the symbol <code>l</code> in the word <code>later</code></p>