JSON Feed 1.1 validation per https://www.jsonfeed.org/version/1.1/
Validates JSON Feeds for:
JSON Feed 1.1 validation per https://www.jsonfeed.org/version/1.1/ Validates JSON Feeds for: - Required fields (version, title, items) - Item requirements (id, content_html or content_text) - Valid date formats (ISO 8601/RFC 3339) - URL validity (home_page_url, feed_url, item url)
(parse-json-feed source)Parse a JSON Feed from a JSON string or reader. Returns a Clojure map.
Parse a JSON Feed from a JSON string or reader. Returns a Clojure map.
(valid-iso8601? s)Check if string is a valid ISO 8601/RFC 3339 datetime.
Check if string is a valid ISO 8601/RFC 3339 datetime.
(valid-json-feed? feed)(valid-json-feed? feed opts)Quick check if a JSON Feed is valid. Returns true/false.
Quick check if a JSON Feed is valid. Returns true/false.
(validate-feed-authors feed)Validate authors array if present.
Validate authors array if present.
(validate-feed-items feed)Feed MUST have an items array.
Feed MUST have an items array.
(validate-feed-title feed)Feed MUST have a title field.
Feed MUST have a title field.
(validate-feed-urls feed)Validate optional feed-level URLs.
Validate optional feed-level URLs.
(validate-item item idx)Validate a single JSON Feed item. Returns a sequence of errors/warnings.
Validate a single JSON Feed item. Returns a sequence of errors/warnings.
(validate-item-content item idx)Each item MUST have content_html or content_text.
Each item MUST have content_html or content_text.
(validate-item-dates item idx)Validate optional date_published and date_modified fields.
Validate optional date_published and date_modified fields.
(validate-item-id item idx)Each item MUST have an id field.
Each item MUST have an id field.
(validate-item-urls item idx)Validate optional URL fields in items.
Validate optional URL fields in items.
(validate-json-feed feed)(validate-json-feed feed {:keys [strict?] :or {strict? false}})Validate a JSON Feed. Returns {:valid? bool :errors [...] :warnings [...] :feed map}.
Arguments:
Options:
Example: (validate-json-feed "{"version":"https://jsonfeed.org/version/1.1",...}") (validate-json-feed parsed-map {:strict? true})
Validate a JSON Feed. Returns {:valid? bool :errors [...] :warnings [...] :feed map}.
Arguments:
- feed: Either a parsed feed map or JSON string
Options:
- :strict? - Treat warnings as errors (default false)
Example:
(validate-json-feed "{\"version\":\"https://jsonfeed.org/version/1.1\",...}")
(validate-json-feed parsed-map {:strict? true})(validate-json-item item)(validate-json-item item {:keys [strict?] :or {strict? false}})Validate a single JSON Feed item. Returns {:valid? bool :errors [...] :warnings [...]}.
Arguments:
Options:
Validate a single JSON Feed item. Returns {:valid? bool :errors [...] :warnings [...]}.
Arguments:
- item: A map with :id, :content_html/:content_text, etc.
Options:
- :strict? - Treat warnings as errors (default false)(validate-version feed)Feed MUST have a version field with a valid jsonfeed.org URL.
Feed MUST have a version field with a valid jsonfeed.org URL.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |