cleanup json api