title: JSON stored in AWS EB environment variables is retrieved without quotes
body: <p>I'm running a node.js EB container and trying to store JSON inside an Environment Variable. The JSON is stored correctly, but when retrieving it via process.env.MYVARIABLE it is returned with all the double quotes stripped.</p>
  
  <p>E.g. MYVARIABLE looks like this:</p>
  
  <p><code>{ "prop": "value" }</code></p>
  
  <p>when I retrieve it via process.env.MYVARIABLE its value is actualy <code>{ prop: value}</code> which isn't valid JSON. I've tried to escape the quotes with '\' ie { \"prop\": \"value\" } that just adds more weird behavior where the string comes back as <code>{\ \"prop\\":\ \"value\\" }</code>. I've also tried wrapping the whole thing in single quotes e.g. <code>'{ "prop": "value" }'</code>, but it seems to strip those out too.</p>
  
  <p>Anyone know how to store JSON in environment variables?</p>
  
  <p>EDIT: some more info, it would appear that certain characters are being doubly escaped when you set an environment variable. E.g. if I wrap the object in single quotes. the value when I fetch it using the sdk, becomes:</p>
  
  <p><code>\'{ "prop": "value"}\'</code></p>
  
  <p>Also if I leave the quotes out, backslashes get escaped so if the object looks like <code>{"url": "http://..."}</code> the result when I query via the sdk is <code>{"url": "http:\\/\\/..."}</code></p>
  
  <p>Not only is it mangling the text, it's also rearranging the JSON properties, so properties are appearing in a different order than what I set them to.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>So I would say this seems to be a bug in AWS based on the fact that it seems to be mangling the values that are submitted. This happens whether I use the node.js sdk or the web console. As a workaround I've taken to replacing double quotes with single quotes on the json object during deployment and then back again in the application.</p>