title: Why we need to convert object to JSON when we send data to back-end server?
body: <p>I only knew that we get the data from back-end server as JSON format. First, why back-end server returns JSON (or XML in the past), instead of object? Why do we need to convert JSON to object when we want to deal with data in client side? Similarly, why we need to convert the object to JSON when we want to send the data back to back-end server?</p>
  
  <p>This is the some reference quote (<a href="https://stackoverflow.com/a/383699/8229192">https://stackoverflow.com/a/383699/8229192</a>): "The JSON Parser also offers another very useful method, stringify. This method accepts a JavaScript object as a parameter, and outputs back a string with JSON format. <strong>This is useful for when you want to send data back to the server</strong>:"</p>
  
  <p>Question 1: Why it was useful?</p>
  
  <pre><code>var anObject = {name: "Andreas", surname : "Grech", age : 20};
  var jsonFormat = JSON.stringify(anObject);
  //The above method will output this: {"name":"Andreas","surname":"Grech","age":20}
  </code></pre>
  
  <p>Question 2: Why server-side (back-end) cannot work with object but have to JSON?</p>
  
  <p>Question 3: Why client-side (front-end) cannot work with JSON but have to object?</p>