output JSON, but we should generalize this a bunch