title: json error: SyntaxError: JSON.parse: unexpected character
body: <p>I have some problem. When I try post json object, I have error: error: <strong>SyntaxError: JSON.parse: unexpected character</strong></p>
  
  <p>My javascript object:</p>
  
  <pre><code>var $arr_data = {
          title: '',
          category: '',
          about: '',
          sex: 'unisex',
          accessories: 'no',
          quantity: []
      };
  </code></pre>
  
  <p>I think that a problem are in this function:</p>
  
  <pre><code>  function data_quantity($size_input,$quant_input)
      {
          var $string = "{color:'"+$pattern+"',size:'"+$size_input+"',quantity:'"+$quant_input+"'}";
          $arr_data.quantity.push($string);
      }
  </code></pre>
  
  <p><code>alert(JSON.stringify($arr_data));</code> returns the following string:</p>
  
  <pre><code>{
  "title":"title_test",
  "category":"3",
  "about":"about_test",
  "sex":"woman",
  "accessories":"no",
  "quantity":[
      "{color:'none',size:'xxl',quantity:'5'}",
      "{color:'black',size:'xxl',quantity:'1'}",
      "{color:'white',size:'s',quantity:'9'}"
      ]
  }
  </code></pre>