Skip to main content

SchemaJsonFormat

Deprecated

This check only exists in Theme Check v1.X.X. We consider this to be the formatter's job.

Identifies improperly formatted JSON in {% schema %} tags.


The following examples contain code snippets that either fail or pass this check.

{% schema %}
{
"locales": {
"en": {
"title": "Welcome", "product": "Product"
},
"fr": { "title": "Bienvenue", "product": "Produit" }
}
}
{% endschema %}

{% schema %}
{
"locales": {
"en": {
"title": "Welcome",
"product": "Product"
},
"fr": {
"title": "Bienvenue",
"product": "Produit"
}
}
}
{% endschema %}

The following example contains the default configuration for this check:

SchemaJsonFormat:
enabled: true
severity: style
ParameterDescription
enabledWhether the check is enabled.
severityThe severity of the check.

Theme Check can correct this error using the --auto-correct flag. When the flag is specified, Theme Check prettifies the JSON data inside of the {% schema %} tag.


Anchor to Disabling this checkDisabling this check

This check is safe to disable. You might want to disable this check if you don't care about the visual appearance of your schema tags.


Was this page helpful?