title: Sublime Text 3 Build System: Backslash in a JSON
body: <p>I want to use MinGW to compile a c program through Sublime Text.
  The command I need to run is:</p>
  
  <pre><code>gcc "${file}" -o "${file_path}\${file_base_name}.exe"
  </code></pre>
  
  <p>(Note the \ in the file path)</p>
  
  <p>I need to write this string as a value in a JSON file. So, I tried to convert the problematic characters:</p>
  
  <pre><code>" =&gt; \"
  \ =&gt; \\
  ...
  </code></pre>
  
  <p>There is no problem with the " character, it converts correctly - the backslash behaves weirdly.
  Here's the command that runs when I try to compile through Sublime:</p>
  
  <pre><code>gcc C:\Users\omer\Desktop${file_base_name}.c -o C:\Users\omer\Desktop${file_base_name}.exe
  </code></pre>
  
  <p>Is the conversion <code>\ =&gt; \\</code> incorrect? What am I missing?</p>
  
  <p>Edit: This is the full build system JSON.</p>
  
  <pre><code>{
  "shell_cmd": "gcc \"${file}\" -o \"${file_path}\\${file_base_name}.exe\"",
  "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
  "working_dir": "${file_path}",
  "selector": "source.c",
  
  "variants":
  [
      {
          "name": "Run",
          "shell_cmd": "gcc \"${file}\" -o \"${file_path}\\${file_base_name}.exe\" &amp;&amp; \"${file_path}\\${file_base_name}.exe\""
      }
  ]
  </code></pre>
  
  <p>}</p>