# JsonLogic

<https://jsonlogic.com/>

- Host: [jsonlogic.com](https://links.thingelstad.xyz/hosts/jsonlogic.com/)
- Saved: June 3, 2021 (2021-06-03T11:39:32Z)
- Record: https://links.thingelstad.xyz/links/f9acdeb0d734/
- JSON: https://links.thingelstad.xyz/links/f9acdeb0d734.json

## What Jamie wrote

Neat way to store rules and other logic in various systems to execute in multiple locations.

> JsonLogic isn’t a full programming language. It’s a small, safe way to delegate one decision. You could store a rule in a database to decide later. You could send that rule from back-end to front-end so the decision is made immediately from user input. Because the rule is data, you can even build it dynamically from user actions or GUI input.
> 
> JsonLogic has no setters, no loops, no functions or gotos. One rule leads to one decision, with no side effects and deterministic computation time.

Seems like a nice implementation agnostic way to store rules.

> JsonLogic is, effectively, an [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree), so order of operations is unambiguous.

Has parsing libraries for Javascript. Python, PHP, and Ruby.

## Facts

- Kind: [Page](https://links.thingelstad.xyz/kinds/page/)

## Appears in

- [WT189: Weekly Thing #189 / TiddlyWiki, JsonLogic, Smiling](https://weekly.thingelstad.com/archive/189/), Notable

## Saved the same week

- [The Unix Game](https://links.thingelstad.xyz/links/375fbace7e55/) (unixgame.io, June 3, 2021)
- [My Software Estimation Technique - Jacob Kaplan-Moss](https://links.thingelstad.xyz/links/c8d70f160530/) (jacobian.org, June 3, 2021)
- [Avatar generator playground - Boring Avatars](https://links.thingelstad.xyz/links/2843b4c72201/) (boringavatars.com, June 3, 2021)
- [River Runner](https://links.thingelstad.xyz/links/7af20c5ea2cc/) (river-runner.samlearner.com, June 3, 2021)
- [Cargo](https://links.thingelstad.xyz/links/407f18a42c97/) (cargo.build, June 3, 2021)

## Elsewhere

- Wayback Machine: https://web.archive.org/web/*/https://jsonlogic.com/
