# json

Source: https://zotonic.com/docs/2374/json

URI: https://zotonic.com/id/2374

Language: en



Validate that a form value is JSON.

Whitespace is trimmed before decoding. An empty value is accepted; combine the validator with `presence` when the field is required. A valid value is returned unchanged apart from surrounding whitespace.

For example:

```django
<textarea id="settings" name="settings"></textarea>
{% validate id="settings" type={json} %}
```

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2374?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2374?language=en>)
