title: How Decode a json String in php
body: <p>This is the Json string</p>
  
  <pre><code>{"Header":{},
  "Body":
      {"ResponseMsg":
          {"response":
              {"ResponseCode":"0020",
                  "ResponseDesc": "user is not accepted!",
                  "ConversationID": {},
                  "OriginatorConversationID":{},
                  "ServiceStatus":"0"
              }
          }
       }
  }
  </code></pre>
  
  <p>This is the code I am using to decode this string;</p>
  
  <pre><code>   $dec = json_decode($json,true);
     var_dump($result-&gt;Header-&gt;Body-&gt;response-&gt;ResponseCode);
  </code></pre>
  
  <p>But I keep on getting the following error</p>
  
  <blockquote>
    <p><b>Notice</b>:  Trying to get property of non-object in <b>C:\xampp\htdocs\web\server.php</b> on line <b>....</b><br /></p>
  </blockquote>
  
  <p>Please assist to decode this icorrectly formated json string</p>