Fix json rendering for empty object and list