---
schema_version: "1"
id: 6b0feacfea3ef0b302b0551ef35a0350687b6d2749050dfedcd000224bc8d92c
title: JSON Rules Output Schema Reference
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/code-analyzer/salesforce-code-analyzer/guides/output-schemas-json-rules.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/output-schemas-json-rules.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 35b0d197ed95ed5cf1fc74d3417d61bd044cff93e3b196fcc981fc4e138f7e80
products:
  - Salesforce Code Analyzer
---
# JSON Rules Output Schema Reference

This example shows how to create a JSON-formatted output file when using the `--output-file` flag of the `code-analyzer rules` command.

```bash
sf code-analyzer rules --rule-selector flow --output-file rules.json
```

## Sample JSON Rules Output

This sample output shows the two rules associated with the `flow` engine.  

```json
{
  "rules": [
    {
      "name": "PreventPassingUserDataIntoElementWithoutSharing",
      "description": "Avoid passing user data into Flow Scanner elements in run mode: Without Sharing",
      "engine": "flow",
      "severity": 2,
      "tags": [
        "Recommended",
        "Security",
        "XML"
      ],
      "resources": []
    },
    {
      "name": "PreventPassingUserDataIntoElementWithSharing",
      "description": "Avoid passing user data into Flow Scanner elements in run mode: With Sharing",
      "engine": "flow",
      "severity": 4,
      "tags": [
        "Recommended",
        "Security",
        "XML"
      ],
      "resources": []
    }
  ]
}
```

## Properties of the Top-Level "rules" Object

| Property Name  | Data Type | Description                                                                                                                                                                                    |
| ----------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | string | The name of the rule. |
| `description` | string | The description of the rule. |
| `engine` | string | The [engine](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/engines.md) that's associated with the rule.                                                          |
| `severity` | string | The default severity level of the rule: 1 (Critical), 2 (High), 3 (Moderate), 4 (Low), 5 (Info)                            |
| `tags` | string[] | An array of tags that are associated with the rule, such as `Recommended`, `Security`, or `BestPractices`. |
| `resources` | string[] | An array of URLs for additional resources and information about the rule. |

