title: Error in receiving JSON object from API
body: <p>I am making an http request from ionic app(Angular4) and receiving a response in form of a Js object, but on receiving i am getting some error.</p>
  
  <p>This is the object which i am receiving from API</p>
  
  <pre><code>{"up_votes":"1","down_votes":"0"}
  </code></pre>
  
  <p>using http.get to receive data in app, home.ts</p>
  
  <pre><code>..
  public vote_response:any={};
  ...
  this.http.get(this.baseURI+'votesNum.php?'+this.question.question_id)
          .subscribe(result =&gt;{this.vote_response = result.json();});
  </code></pre>
  
  <p>this is the error which i am receiving:</p>
  
  <pre><code>ERROR SyntaxError: Unexpected token &lt; in JSON at position 0
      at JSON.parse (&lt;anonymous&gt;)
      at Response.Body.json (http.es5.js:800)
      at MapSubscriber.project (forum-quest-details.ts:44)
      at MapSubscriber._next (map.js:77)
      at MapSubscriber.Subscriber.next (Subscriber.js:89)
      at XMLHttpRequest.onLoad (http.es5.js:1229)
      at t.invokeTask (polyfills.js:3)
      at Object.onInvokeTask (core.es5.js:4119)
      at t.invokeTask (polyfills.js:3)
      at r.runTask (polyfills.js:3)
  </code></pre>
  
  <p>Can anyone help me solve this issue.</p>