title: php json_decode error quoted object property name expected
body: <p>I try to create a script that decoding a simple <code>JSON</code> string in <code>PHP</code> and I get the following error:</p>
  
  <p><code>quoted object property name expected</code></p>
  
  <p>The string I try to decode is the following :</p>
  
  <pre><code>{"values":[{"url":"http://www.google.com","matches":"http|www|google|com"},{"url":"http://www.yahoo.com","matches":"http|www|yahoo|com"}]}
  </code></pre>
  
  <p>and the code I use to decoded is the following:</p>
  
  <pre><code>json_decode( $json_string );
  </code></pre>
  
  <p>I also have try to validate my json string in some online json validators, and the string seems to be fine.</p>
  
  <p>Can someone please help me ?</p>
  
  <p>Do you think the problem exists because of the double quotes ?</p>
  
  <p><strong>Update #1</strong></p>
  
  <p>Definetelly was a debuging issue. I place my experience here just to help other devs may come accross the same issue in the feature:</p>
  
  <p>The problem was that my variable that came with the json string was html encoded so instead of the following string :</p>
  
  <pre><code>{"values":[{"url":"http://www.google.com","matches":"http|www|google|com"},{"url":"http://www.yahoo.com","matches":"http|www|yahoo|com"}]}
  </code></pre>
  
  <p>my variable came with the following string inside :</p>
  
  <pre><code>{&amp;quot;values&amp;quot;:[{&amp;quot;url&amp;quot;:&amp;quot;http://www.google.com&amp;quot;,&amp;quot;matches&amp;quot;:&amp;quot;http|www|google|com&amp;quot;},{&amp;quot;url&amp;quot;:&amp;quot;http://www.yahoo.com&amp;quot;,&amp;quot;matches&amp;quot;:&amp;quot;http|www|yahoo|com&amp;quot;}]}
  </code></pre>
  
  <p>The mistake by my side was that I used the <code>print_r</code> method instead of the  <code>var_dump</code> . This had as a result to print out the <code>&amp;quot</code> as <code>"</code> in my page .</p>