Add graphModel.JSON() function.