title: SQL For Json path - auto inserted '\' if parameter content '/'
body: <pre><code>Declare @ContractCode nvarchar(100) = N'02/HĐLĐ-NGG';
  Declare @DateStartWork date = '2020-06-01';
  Declare @DeptID int = 2;
  Declare @PositionID int = 4;
  Declare @HRDecisionID int = 614
  
  Select @ContractCode as ContractCode,
         @DateStartWork as DateStartWork,
         @DeptID as DeptID,
         @HRDecisionID as HRDecisionID
  For Json Path
  </code></pre>
  <p>Then the Result =</p>
  <pre class="lang-json prettyprint-override"><code>[{&quot;ContractCode&quot;:&quot;02\/HĐLĐ-NGG&quot;,&quot;DateStartWork&quot;:&quot;2020-06-01&quot;,&quot;DeptID&quot;:2,&quot;HRDecisionID&quot;:614}]
  </code></pre>
  <p>Instead of right value like:</p>
  <pre class="lang-json prettyprint-override"><code>[{&quot;ContractCode&quot;:&quot;02/HĐLĐ-NGG&quot;,&quot;DateStartWork&quot;:&quot;2020-06-01&quot;,&quot;DeptID&quot;:2,&quot;HRDecisionID&quot;:614}]
  </code></pre>
  <p>So please help me to answer Why it automatically inserted \ before '/' into ContractCode.</p>