☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

allow_booleans

Table of contents

Description:

This key toggles whether CloudCannon will allow unquoted boolean values like true and false when parsing snippet parameters.

Setting this key to true will allow unquoted boolean values in snippet parameter parsing.

By default, this key is false (i.e., unquoted boolean values are not allowed).

Appears in:
└── Snippet Format
    └── allow_booleans
Type:
boolean
Examples:

In this example, we have configured snippet format to allow unquoted boolean values.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[param]]>>
    params:
      param:
        parser: argument
        options:
          format:
            allow_booleans: true
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[param]]>>",
      "params": {
        "param": {
          "parser": "argument",
          "options": {
            "format": {
              "allow_booleans": true
            }
          }
        }
      }
    }
  }
}
Open in a new tab