Converting JSON to HTML table in Python

后端 未结 2 2076
暗喜
暗喜 2021-02-08 23:49

I\'ve been using the JSON library for Python to get data from JSON files using Python.

infoFromJson = json.loads(jsonfile)

I fully understand h

2条回答
  •  一个人的身影
    2021-02-09 00:15

    Try the following:

    infoFromJson = json.loads(jsonfile)
    print json2html.convert(json = infoFromJson)
    

    The result from json2html.convert is a string.

    If you don't have json2html module:

    $ pip install json2html
    

    More examples here.

提交回复
热议问题