title: Json: PHP to JavaScript safe or not?
body: <p>I understand that the use of <code>eval(json_str)</code> on the client is vulnerable to malicious code. My question is, if <code>json_str</code> was an array constructed by the PHP function <code>json_encode</code>, would I be safe? </p>
  
  <p>For example,</p>
  
  <pre><code>json_str = json_encode(array(record1, 
                               record2, 
                               record3));
  </code></pre>
  
  <p>would it now be entirely safe to use <code>eval(json_str)</code> inside client-side code?</p>