JSON Templating in Node / Express

Does Node / Express have a JSON modeling engine such as RABL ( https://github.com/nesquena/rabl ) or JBuilder? ( http://railscasts.com/episodes/320-jbuilder?view=asciicast ). I do not mean the engine of HTML templates, for example Handlebars, Jade or Underscore.js. I mean JSON templating engine. These libraries make it easy to collect and select the elements and associations of your JSON.

+7
json templating express
source share
1 answer

It seems like finally! Here is a link to it https://www.npmjs.com/package/javelin It is also at an experimental stage, so it’s not yet ready for production.

Here is an excerpt from the link

javelin has several key goals:

  • A simple, familiar way to separate presentation logic from your data in the RESTful API
  • A simple, easy template language that makes sense for application data.
  • Ability to serve your API data in different formats from the same view

Finally, it is heavily inspired by RABL.

Hope this helps!

+1
source share

All Articles