Renders the compiled template using a JSON object as variables.
Top-level string values in the JSON object are used as template variables.
Example:
string tpl = "Hello, " + "{{na" + "me}}!";
var tmpl = Template.compile (tpl);
var json = Json.parse ("{\"name\": \"World\"}");
string result = tmpl.renderJson (json);
| vars |
JSON object whose string values are used as variables. |
|
rendered string. |