make xhr post json nicely