Generate JSON directly from objects