title: How can I parse JSON with comments using System.Text.Json?
body: <p>I have some JSON that includes comments (even though comments aren't strictly allowed in the <a href="https://www.json.org/json-en.html" rel="noreferrer">JSON spec</a>.)  How can I parse this JSON using <code>System.Text.Json</code>?</p>
  
  <p>The JSON I have received is as folows:</p>
  
  <pre><code>// A person
  {
      "Id" : 1 /* Person's ID */,
      "Name" : "Foo" // Person's name
  }
  </code></pre>
  
  <p>When I attempt to load it into a <code>JsonDocument</code> like so:</p>
  
  <pre><code>using var doc = JsonDocument.Parse(jsonString);
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <blockquote>
    <pre class="lang-none prettyprint-override"><code>System.Text.Json.JsonReaderException: '/' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
     at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader&amp; json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
     at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)```
  </code></pre>
  </blockquote>
  
  <p>And when I attempt to deserialize with <code>JsonSerializer</code>:</p>
  
  <pre><code>var person = JsonSerializer.Deserialize&lt;Person&gt;(jsonString);
  </code></pre>
  
  <p>I get a similar exception:</p>
  
  <blockquote>
    <pre class="lang-none prettyprint-override"><code>System.Text.Json.JsonException: '/' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
   ---&gt; System.Text.Json.JsonReaderException: '/' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
     at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader&amp; json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
     at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
  </code></pre>
  </blockquote>
  
  <p>How can I parse or deserialize this JSON with <code>System.Text.Json</code>?</p>