add json output
reformat code to be closer to PEP 8
Merge pull request #160 from ozon/features/help-json_output

[core] add json output for autodoc