title: Get JSON response In Codeigniter
body: <p>I am passing the Object from fiddler to the service written in codeigniter. My Object is something look like this :</p>
  
  <p><strong>My Response :</strong></p>
  
  <pre><code>   {
     "GetResponse":{
        "OrgName":"adfasd",
        "OrgAdr1":"asdf",
        "OrgAdr2":"NA",
        "ProductList":[
            {
                 "ProductID":8724,
                 "Pallets":0,
                 "Pieces":0,
                 "Description":"sdfsd"
            }
         ]
     }
  }
  </code></pre>
  
  <p><strong>What I want :</strong></p>
  
  <p>I want to save the response as a JSON Object in codeigniter and also want to fetch the JSON Object or Array inside the main Object.</p>
  
  <p><strong>What I tried :</strong></p>
  
  <p>My service method in codeigniter is something like this :</p>
  
  <pre><code>public function Save()
  {
       $Data = json_decode(file_get_contents('php://input'));
       echo $Data;
  }
  </code></pre>
  
  <p>But I am getting nothing in <strong>Response Body</strong> inside Fiddler.</p>
  
  <p>If I use this code :</p>
  
  <pre><code>$Data = file_get_contents('php://input');
  echo $Data;
  </code></pre>
  
  <p>then it is showing me the response but in the form of String. I want to save it as an JSON Object.</p>
  
  <p>Can anyone tell me what am I missing here ?</p>