Added routine to handle JSON specifically.