Skip to content

garyhurtz/html2json.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html2json.py

Tools for building HTML and parsing HTML into JSON in Python, and rendering HTML from JSON using Jinja.

The JSON data structure follows that used in html2json.js and json2html.js, so that the resulting JSON can (for example) be constructed and/or stored on a Python server, passed to the browser via an AJAX call, then rendered using javascript.

The json2html.html Jinja macro is also compatible with nunjucks, so both server-side and client-side templating are supported. Client-side rendering can also be performed in pure javascript using json2html.js).

The code is pretty straight-forward, and can be easily modified to support alternative JSON data structures from other libraries.

Take a look at the documentation for more information.

About

Tools for building HTML and parsing HTML into JSON in Python, and rendering HTML from JSON using Jinja.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published