めざせpythonライブラリマスター （36）json2html

#【ライブラリ説明】
　json形式をhtmlテーブルの見やすい形に変形

#【プログラム】
```py:json2html_1.py
# -*- coding: utf-8 -*-

from json2html import json2html

print json2html.convert(json = {'name':'softvar','age':'22'})
# <table border="1"><tr><th>age</th><td>22</td></tr><tr><th>name</th><td>softvar</td></tr></table>
```
<img width="82" alt="1.png" src="https://qiita-image-store.s3.amazonaws.com/0/121997/f22e69e2-6d23-6453-7f7f-1ecf8739fdc0.png">

```py:json2html_2.py
# -*- coding: utf-8 -*-

from json2html import json2html

_json2conv = {"sample": [ {"a":1, "b":2, "c":3}, {"a":5, "b":6, "c":7} ] }
print json2html.convert(json = _json2conv)

'''
<table border="1"><tr><th>sample</th><td><table border="1"><tr><th>a</th>
<th>c</th><th>b</th></tr><tr><td>1</td><td>3</td><td>2</td></tr>
<tr><td>5</td><td>7</td><td>6</td></tr></table></td></tr></table>
'''
```
<img width="89" alt="2.png" src="https://qiita-image-store.s3.amazonaws.com/0/121997/6e741abb-6560-acbb-9d11-2a411efcc638.png">

```py:json2html_3.py
# -*- coding: utf-8 -*-

from json2html import json2html

_json2conv = {
        "glossary": {
                "title": "example glossary",
                "GlossDiv": {
                        "title": "S",
                        "GlossList": {
                                "GlossEntry": {
                                        "ID": "SGML",
                                        "SortAs": "SGML",
                                        "GlossTerm": "Standard Generalized Markup Language",
                                        "Acronym": "SGML",
                                        "Abbrev": "ISO 8879:1986",
                                        "GlossDef": {
                                                "para": "A meta-markup language, used to create markup languages such as DocBook.",
                                                "GlossSeeAlso": ["GML", "XML"]
                                        },
                                        "GlossSee": "markup"
                                }
                        }
                }
        }
}

print json2html.convert(json = _json2conv)

'''
<table border="1"><tr><th>glossary</th><td><table border="1"><tr><th>title</th>
<td>example glossary</td></tr><tr><th>GlossDiv</th><td><table border="1"><tr>
<th>GlossList</th><td><table border="1"><tr><th>GlossEntry</th><td><table border="1">
<tr><th>GlossDef</th><td><table border="1"><tr><th>GlossSeeAlso</th>
<td><ul><li>GML</li><li>XML</li></ul></td></tr><tr><th>para</th>
<td>A meta-markup language, used to create markup languages such as DocBook.</td>
</tr></table></td></tr><tr><th>GlossSee</th><td>markup</td></tr><tr>
<th>Acronym</th><td>SGML</td></tr><tr><th>GlossTerm</th>
<td>Standard Generalized Markup Language</td></tr><tr><th>SortAs</th>
<td>SGML</td></tr><tr><th>Abbrev</th><td>ISO 8879:1986</td></tr><tr>
<th>ID</th><td>SGML</td></tr></table></td></tr></table></td></tr><tr>
<th>title</th><td>S</td></tr></table></td></tr></table></td></tr></table>
'''
```
<img width="790" alt="3.png" src="https://qiita-image-store.s3.amazonaws.com/0/121997/d9c694bc-f64e-7b07-8308-e697e94909df.png">

#【参考サイト】
　[pypi](https://pypi.python.org/pypi/json2html/1.0.1)
　[github](https://github.com/softvar/json2html)