title: How can I read JSON content with a comment with Json.NET?
body: <p>In order to install an external extension into Google Chrome browser, I try to update a Chrome external extension JSON file. Using <code>Json.NET</code> it seems to be easy:</p>
  
  <pre class="lang-cs prettyprint-override"><code>string fileName = &quot;...&quot;; // Path to a Chrome external extension JSON file
  
  string externalExtensionsJson = File.ReadAllText(fileName);
  
  JObject externalExtensions = JObject.Parse(externalExtensionsJson);
  </code></pre>
  <p><br>but I get a <code>Newtonsoft.Json.JsonReaderException</code> saying:</p>
  <pre class="lang-cs prettyprint-override"><code>&quot;Error parsing comment. Expected: *, got /. Path '', line 1, position 1.&quot;
  </code></pre>
  <p><br>when calling <code>JObject.Parse</code> because this file contains:</p>
  <pre class="lang-cs prettyprint-override"><code>// This JSON file will contain a list of extensions that will be included
  // in the installer.
  
  {
  }
  </code></pre>
  <p>And comments are not part of JSON (as seen in <em><a href="https://stackoverflow.com/questions/9495718/how-do-i-add-comments-to-json-net-output">How do I add comments to Json.NET output?</a></em>).</p>
  <p>I know I can remove comments with a regular expression (<em><a href="https://stackoverflow.com/questions/1569295/regular-expression-to-remove-javascript-double-slash-style-comments">Regular expression to remove JavaScript double slash (//) style comments</a></em>), but I need to rewrite JSON into the file after modification and keeping comment can be a good thing.</p>
  <p>Is there a way to read JSON content with comments without removing them and be able to rewrite them?</p>