encode url to json blob