title: Postgres json_object. Add json field only if value is not null
body: <p>Im using jsob_build_object function to generate json from data in my table.</p>
  
  <pre><code>select json_build_object('name', p.name, 'birthday', p.birthday)
  FROM Person p limit 2
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>{"name":"John", "birthday", "2000-01-01"}
  {"name":"George", "birthday", "null"}
  </code></pre>
  
  <p>Now as you can see in second row birthday is null. In that case I would like that JSON field (birthday) to not be present there so the result would be:</p>
  
  <pre><code>{"name":"John", "birthday", "2000-01-01"}
  {"name":"George"}
  </code></pre>
  
  <p>Is it possible?</p>