Added code to publish the json query