# valid-json-template **Repository Path**: mirrors_FGRibreau/valid-json-template ## Basic Information - **Project Name**: valid-json-template - **Description**: Use a (valid) JSON as a template that produce another valid JSON as a result - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # valid-json-template *yeah, because `json-template` was taken* [![Deps](https://david-dm.org/FGRibreau/valid-json-template.png)](https://david-dm.org/FGRibreau/valid-json-template) [![Version](http://badge.fury.io/js/valid-json-template.png)](https://david-dm.org/FGRibreau/valid-json-template) [![Downloads](http://img.shields.io/npm/dm/valid-json-template.svg)](https://www.npmjs.com/package/valid-json-template) [![Circle CI](https://circleci.com/gh/FGRibreau/valid-json-template/tree/master.svg?style=svg)](https://circleci.com/gh/FGRibreau/valid-json-template/tree/master) [![Slack](https://img.shields.io/badge/Slack-Join%20our%20tech%20community-17202A?logo=slack)](https://join.slack.com/t/fgribreau/shared_invite/zt-edpjwt2t-Zh39mDUMNQ0QOr9qOj~jrg) ### Why Because sometimes you have a template like this **that needs to be a valid JSON**: ```js var myTemplate = `{ "user": { "age": "{{ age.computed }}", "biography": "{{ biography }}", "hasBlueEyes": "{{ eyes.areBlue }}", } }`; ``` with a dataset like this: ```json { "biography": "Hello world, 42.", "age":{ "computed": 25 }, "eyes":{ "areBlue": true } } ``` and you want this: ```json { "user": { "age": 25, "biography": "Hello world, 42.", "hasBlueEyes": true } } ``` ### npm ```shell npm install valid-json-template -S ``` ### [changelog](/CHANGELOG.md)