Render arbitrary JSON in HTML

前端 未结 4 1350
感动是毒
感动是毒 2021-01-13 23:47

I\'m writing a data viewer page to render objects being sent as JSON from the server. The JSON objects vary in content and complexity, from flat objects with a handful of at

4条回答
  •  情深已故
    2021-01-14 00:27

    Tooting my own horn, you could probably adapt JSON2HTML to your needs. The source is at https://github.com/bloopletech/json2html - see scripts/parse.js for the core that parses the JSON and generates the HTML.

提交回复
热议问题