Add print --type json to print a valid JSON array

Reviewers: marcua

Reviewed By: marcua

Differential Revision: http://phabricator.locu.com/D5306