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

allow_null

Table of contents

Description:

This key toggles whether CloudCannon will allow null values when parsing snippet parameters.

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

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

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

In this example, we have configured snippet format to allow null values in parameter parsing.

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