rougail-output-json/README.md
2025-12-24 09:30:54 +01:00

21 lines
2.9 KiB
Markdown

---
gitea: none
include_toc: true
---
[🇬🇧 (EN)](README.md) - [🇫🇷 (FR)](README.fr.md)
## Export configuration to JSON format
> [!NOTE]
>
> Exporting the configuration in JSON format makes it easier to process the configuration in an external tool, for example.\
> **Path**: json\
> *`disabled`*\
> **Disabled**: if json is not set in "[Select for output](#step.output)"
| Variable | Description | Default value | Type |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
| **<a id="json.mandatory" name="json.mandatory">json.mandatory</a>**<br/>**Command line**: <br/>&nbsp;--json.mandatory<br/>&nbsp;--json.no-mandatory<br/>**Environment variable**: JSON.MANDATORY | Test mandatories variables before display in JSON.<br/>The configuration must be valid before exporting the data to JSON format. It&#x27;s better to validate the values at the beginning of the process. | true if "[Configuration in output step is in read_write mode](#cli.read_write)" is false | [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` |
| **<a id="json.get" name="json.get">json.get</a>**<br/>**Command line**: <br/>--json.get<br/>**Environment variable**: JSON.GET | Get value for a variable or a family.<br/>By default, the entire configuration is exported as JSON. It is possible to retrieve variable values from a defined family or directly the value of a variable.<br/>**Examples**: <br/>&nbsp;family<br/>&nbsp;family.variable | | [`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) |