As discussed recently, here is an undocumented patch for json_strip_nulls and jsonb_strip_nulls.
cheers
andrew