title: How to convert rows to JSON in TSQL select query?
body: <p>Following query returns whole table as single JSON string (list of JSON objects - one per row):</p>
  
  <pre><code>SELECT * FROM MyTable FOR JSON AUTO 
  </code></pre>
  
  <p>I need to return multiple rows where each row will be a JSON string of a signle row of the table.</p>
  
  <p>For example if table fields are A,B,C output should be:</p>
  
  <pre><code>{A: &lt;value&gt;, B: &lt;value&gt;, C: &lt;value&gt;}
  {A: &lt;value&gt;, B: &lt;value&gt;, C: &lt;value&gt;}
  {A: &lt;value&gt;, B: &lt;value&gt;, C: &lt;value&gt;}
  ...
  {A: &lt;value&gt;, B: &lt;value&gt;, C: &lt;value&gt;}
  </code></pre>
  
  <p><strong>How to do this in TSQL ?</strong></p>
  
  <p>While it's possible to construct JSON strings by hand by concatenating strings, I'd prefer to reuse existing tool that would handle cases like quotes in values.</p>