improvements to json api