{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "div",
      "attributes": {
        "iconName": "=if(@currentField,'CheckboxComposite','Checkbox')",
        "class": "=if(@currentField,'ms-fontColor-neutralPrimary','ms-fontColor-neutralTertiary')+' ms-fontSize-l'"
      },
      "style": {
        "cursor": "pointer"
      },
      "customRowAction": {
        "action": "setValue",
        "actionInput": {
          "YesNoColumnInternalName": "=if(@currentField , '0' , '1' )"
        }
      }
    }
  ]
}