add on listener to json api.
Include json api in build.