Skip to content

Creating Rules

cinnamon-rolls edited this page Jul 14, 2021 · 2 revisions

Creating Rules

Rules are defined in JSON documents, and are parsed by Rule Templates.

Multiple definitions per file

If the root element in the JSON document is an array, then the array will be iterated and each object within the array will be treated as its own JSON document.

You may wish to keep closely related rules in one file.

Example:

[{ "name": "My Rule" }, { "name": "Another closely related rule" }]

You can also ignore that this feature exists and put each rule in its own document. Do whatever works for you.

Comments inside of files

C-Style comments are not permitted in any of the JSON documents, but the $comment key may be added to any object and is guaranteed to always be ignored by all versions of this software.