Adds --json,--pprint flags to cmd

* Add flags to output cmd results in json(--json)
  and pretty print(--pprint) format

Change-Id: Id4331761e4f9c4bb6735745ed8461eaa671d0945
Closes-Bug: #1341501
Merge "Adds --json,--pprint flags to cmd"