Update sample with renderAsJson