print query info in json, too, not just xml