title: Firebase won't save keys with null values
body: <p>I have an object like:</p>
  
  <pre><code>var _json = { "objects":[{
      "type":"path", "originX":"center", "originY":"center", "left":48.59, 
      "top":132.5, "width":64.5,"height":173, "fill":null,"stroke":"#3f7cc4", 
      "strokeWidth":12,"strokeDashArray":null
  }]}
  </code></pre>
  
  <p>I save this object using Firebase as:</p>
  
  <pre><code>var myDataRef = new Firebase(&lt;...&gt;);
  myDataRef.child("saved_projects").child(authData.uid).update({'P3': _json});
  </code></pre>
  
  <p>But, when I retrieve the same using Firebase <code>on</code> method and get the value as:</p>
  
  <pre><code>snapshot.val()
  </code></pre>
  
  <p>I get the object but keys with <code>null</code> values got removed i.e. I only got:</p>
  
  <pre><code>{"objects":[ {"type":"path", "originX":"center", 
   "originY":"center","left":48.59, "top":132.5,"width":64.5, 
   "height":173, "stroke":"#3f7cc4","strokeWidth":12
  }]}
  </code></pre>
  
  <p>This is causing me some weird issues since I'm using <code>Fabric.js</code> and it needs these values.
  Please help!</p>
  
  <p><strong>EDIT / UPDATE(Hack)</strong></p>
  
  <p>For the time being, I'm using a weird HACK, before storing the object to Firebase I'm converting all the <code>null</code> values to <code>0</code>. But I want to know a nicer way to do.</p>
  
  <pre><code>function recursivelyReplaceNullToZero(j) {
      for (var i in j){
          if (typeof j[i] === "object") {
              recursivelyReplaceNullToZero(j[i]);
          }
          if (j[i] === null) {
              j[i] = 0;
          }
      }
  }
  recursivelyReplaceNullToZero(_json);
  </code></pre>