Merge pull request #1479 from petrhosek/json

Support JSON output format in addition to XML