When comparing Json2html vs Nunjucks, the Slant community recommends Nunjucks for most people. In the question“What are the best JavaScript templating engines?” Nunjucks is ranked 5th while Json2html is ranked 30th.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Embedded jQuery Events
Allows for jQuery events to be embedded within the template when used on the client.
Pro No special template syntax to learn
Templates are JSON objects that can include javascript functions to render any complex logic.
Pro Portable to server and client
Templates are stored as JSON rather than HTML, easily ported to both client and server.
Pro Very user friendly
Pro Building blocks for CMS Websites
Another token based system with all of the logic, looping and variable control that other engines provide. But in addition it supports some more advanced page composition elements e.g. block inheritance, includes, layout inheritance, custom tags and macros — all absolutely perfect for a CMS where pages are typically composed of a series of “building blocks”.
Reference:
link
Pro Suppported by Mozilla
Pro Has Jinja2 as role model
Pro Open Source
Cons
Con Templates can be hard to read
HTML structure for template replicated in JSON, can be hard to read.