Tree.

json(tree)

Render the contents of the tree in JSON format.

The ori tool uses YAML as its default output format, so you can use the json function to reformat the output as JSON:

$ ori greetings.yaml
Alice: Hello, Alice.
Bob: Hello, Bob.
Carol: Hello, Carol.
$ ori Tree.json greetings.yaml
{
  "Alice": "Hello, Alice.",
  "Bob": "Hello, Bob.",
  "Carol": "Hello, Carol."
}

See also the more general Origami.json, which can render objects to JSON that aren’t trees.