https://github.com/zephraph/jexl
The JSON Expression Language
https://github.com/zephraph/jexl
Last synced: 6 months ago
JSON representation
The JSON Expression Language
- Host: GitHub
- URL: https://github.com/zephraph/jexl
- Owner: zephraph
- License: apache-2.0
- Created: 2025-04-29T00:37:03.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-12T22:19:36.000Z (8 months ago)
- Last Synced: 2025-08-12T23:33:04.022Z (8 months ago)
- Language: TypeScript
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jexl -- JSON Expression Language
A programming language whose syntax is pure JSON.
## Examples
```json jexl
{
"name": "fibonacci",
"lang_version": "v0.1",
"program": [
{
"function": {
"name": "fib",
"params": [{"n": "integer"}],
"body": {
"if": {
"condition": { "less": [{ "var": "n" }, 2] },
"then": [{ "var": "n" }],
"else": [
{
"add": [
{"fib": [{ "subtract": [{ "var": "n" }, 1 ]}]},
{"fib": [{"subtract": [{ "var": "n" }, 2 ]}]}
]
}
]
}
}
}
},
{"print": [{"fib": [7]}]}
]
}
```
```json jexl
{
"lang_version": "v0.1",
"program": [
{
"function": {
"name": "greet",
"params": [{ "name": "string" }],
"body": { "print": [{ "concat": ["Hello, ", { "ref": "name" }] }]}
}
},
{"greet": ["Alice"]}
]
}
```