title: Call a rest WS and get: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
body: <p>I called a rest WS from my html page and I wanna get the json response:</p>
  
  <p>I tried the following code:</p>
  
  <pre><code>  if (window.XMLHttpRequest){ xmlhttpp=new XMLHttpRequest();
    }else{
    xmlhttpp=new ActiveXObject("Microsoft.XMLHTTP"); 
    }
    xmlhttpp.open("GET","http://localhost:8080/myApp/services/userService/getUser/1");
    xmlhttpp.send();
  
    var json = xmlhttpp.responseText,
    obj = JSON.parse(json);
    alert('json'+obj.email);
  </code></pre>
  
  <p>But I get thar error:</p>
  
  <pre><code>SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
  </code></pre>
  
  <p>NB: This ws returns:</p>
  
  <pre><code>{"active":"true","email":"USER1@gmail.com","id":"1","userName":"USER1"}
  </code></pre>