title: Uncaught SyntaxError: Unexpected token o : Simple JSON parser not working
body: <p>Can someone see what is wrong with this simple JSON parser? 
  (<a href="http://jsfiddle.net/m36n6zoj/1/" rel="nofollow">JSFiddle Link</a>)</p>
  
  <p>I am getting an error in the console saying 
  <code>Uncaught SyntaxError: Unexpected token o</code></p>
  
  <pre><code>var a = document.getElementById('a');
  
  var json = {
              type: "cow",
              sound: "moo",
              colors: ["black", "white", "brown"],
              feed: {
                  types: ["hay", "grass"],
                  consistency: "wet"
              }
          };
  
  var parsed = JSON.parse(json);
  
  //called with every property and it's value
  function process(key,value) {
     console.log(key + " : " + value);
  }
  
  function traverse(o,func) {
      for (var i in o) {
          func.apply(this,[i,o[i]]);  
          if (o[i] !== null &amp;&amp; typeof(o[i])=="object") {
              //going on step down in the object tree!!
              traverse(o[i],func);
          }
      }
  }
  
  //that's all... no magic, no bloated framework
  traverse(json,process);
  </code></pre>