Liking cljdoc? Tell your friends :D

atom-validator.jsonfeed

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)
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)
raw docstring

iso8601-patternclj

source

parse-json-feedclj

(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.
sourceraw docstring

valid-iso8601?clj

(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.
sourceraw docstring

valid-json-feed?clj

(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.
sourceraw docstring

valid-versionsclj

source

validate-feed-authorsclj

(validate-feed-authors feed)

Validate authors array if present.

Validate authors array if present.
sourceraw docstring

validate-feed-itemsclj

(validate-feed-items feed)

Feed MUST have an items array.

Feed MUST have an items array.
sourceraw docstring

validate-feed-titleclj

(validate-feed-title feed)

Feed MUST have a title field.

Feed MUST have a title field.
sourceraw docstring

validate-feed-urlsclj

(validate-feed-urls feed)

Validate optional feed-level URLs.

Validate optional feed-level URLs.
sourceraw docstring

validate-itemclj

(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.
sourceraw docstring

validate-item-contentclj

(validate-item-content item idx)

Each item MUST have content_html or content_text.

Each item MUST have content_html or content_text.
sourceraw docstring

validate-item-datesclj

(validate-item-dates item idx)

Validate optional date_published and date_modified fields.

Validate optional date_published and date_modified fields.
sourceraw docstring

validate-item-idclj

(validate-item-id item idx)

Each item MUST have an id field.

Each item MUST have an id field.
sourceraw docstring

validate-item-urlsclj

(validate-item-urls item idx)

Validate optional URL fields in items.

Validate optional URL fields in items.
sourceraw docstring

validate-json-feedclj

(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:

  • 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 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})
sourceraw docstring

validate-json-itemclj

(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:

  • item: A map with :id, :content_html/:content_text, etc.

Options:

  • :strict? - Treat warnings as errors (default false)
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)
sourceraw docstring

validate-versionclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close