writing compact json