Feature json format

Hi Kohki,

Here's a PR adding json format to nodes and roles commands

Additional changes:
* fixed a bug when a format exception is thrown in task command
* now task data in json returned by task command is indexed by the name of the task
* some typo change to fit PSR guidelines