Fix #3: add option to output in JSON