Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/json-e/json-e
A data-structure parameterization system written for embedding context in JSON objects
https://github.com/json-e/json-e
expression-language json string-interpolation template untrusted-values yaml
Last synced: 3 months ago
JSON representation
A data-structure parameterization system written for embedding context in JSON objects
- Host: GitHub
- URL: https://github.com/json-e/json-e
- Owner: json-e
- License: mpl-2.0
- Created: 2017-01-19T16:17:18.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T20:33:44.000Z (9 months ago)
- Last Synced: 2024-04-24T11:11:35.584Z (7 months ago)
- Topics: expression-language, json, string-interpolation, template, untrusted-values, yaml
- Language: Rust
- Homepage: https://json-e.js.org/
- Size: 9.31 MB
- Stars: 145
- Watchers: 12
- Forks: 86
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# JSON-e
JSON-e is a data-structure parameterization system for embedding context in
JSON objects.The central idea is to treat a data structure as a "template" and transform it,
using another data structure as context, to produce an output data structure.There are countless libraries to do this with strings, such as
[mustache](https://mustache.github.io/). What makes JSON-e unique is that it
operates on data structures, not on their textual representation. This allows
input to be written in a number of formats (JSON, YAML, etc.) or even generated
dynamically. It also means that the output cannot be "invalid", even when
including large chunks of contextual data.JSON-e is also designed to be safe for use on untrusted data. It never uses
`eval` or any other function that might result in arbitrary code execution. It
also disallows unbounded iteration, so any JSON-e rendering operation will
finish in finite time.## Language Definition and Implementations
This repository both defines the JSON-e language and contains several
implementations of that language.The language definition is embodied in [`./specification.yml`](./specification.yml) and the
documentation for the language constructs.The language and implementations are all versioned together, following semantic
versioning. Breaking changes to the language specification are not common, and
typically result from bugfixes rather than new features. Generally, you may
consider the language stable.Any discrepancy in behavior between the implementations that is not documented
as undefined behavior is considered a bug. If fixing that bug can cause
backward incompatibility in an implementation, then the change may be considered
breaking and be released with a new major version.### Other Implementations
* [json-everything](https://json-everything.net/json-e) provides a implementation in .NET.
## Full Documentation
See [json-e.js.org](https://json-e.js.org).
## Changes
See
[CHANGELOG.rst](https://github.com/json-e/json-e/blob/main/CHANGELOG.rst)
for the changes in each version of this library.## In Action
Where is JSON-e used?
* [AlterSchema](https://alterschema.sourcemeta.com/) specifies upgrades as a set of declarative transformation rules written in JSON Schema itself and JSON-e.
* [Taskcluster](https://taskcluster.net/) uses JSON-e extensively to generate task definitions from various JSON-shaped inputs such as GitHub events.(feel free to submit a PR to add your project here)