 <p>You should probably adapt your server side code to ignore the null values and return only the fields that are set (thus avoiding unnecessary bandwidth usage).<br> In your clientside code I suggest you have a set of defaults for your template and extend them received JSON with the defaults.<br> I'd you're using jquery, the code would look like this : </p> <pre><code>var defaults ={someDay:"somePlace"}; var object = $.extend({},defaults,theJson); </code></pre> <p><strong>update</strong><br> and in order to "clean up" the object in php, you can do something like : </p> <pre><code>foreach($obj as $k =&gt; $v) if($v == null) unset($obj[$k]); </code></pre>