download as json; fix #66