Liking cljdoc? Tell your friends :D

atom-validator.core

Feed validation library supporting Atom, RSS 2.0, and JSON Feed 1.1.

Validates feeds for:

  • Required elements per RFC 4287 (Atom), RSS 2.0 spec, or JSON Feed 1.1
  • Valid date formats (RFC 3339 for Atom/JSON Feed, RFC 822 for RSS)
  • Feed freshness (updated/lastBuildDate timestamp)
  • URL validity
  • Semantic consistency (day-of-week in titles, Atom only)

Auto-detects feed format from content (XML root element or JSON structure).

Feed validation library supporting Atom, RSS 2.0, and JSON Feed 1.1.

Validates feeds for:
- Required elements per RFC 4287 (Atom), RSS 2.0 spec, or JSON Feed 1.1
- Valid date formats (RFC 3339 for Atom/JSON Feed, RFC 822 for RSS)
- Feed freshness (updated/lastBuildDate timestamp)
- URL validity
- Semantic consistency (day-of-week in titles, Atom only)

Auto-detects feed format from content (XML root element or JSON structure).
raw docstring

detect-feed-formatclj

(detect-feed-format source)

Detect feed format from content. Returns :atom, :rss, :json-feed, or :unknown.

Detect feed format from content.
Returns :atom, :rss, :json-feed, or :unknown.
sourceraw docstring

parse-feedclj

(parse-feed source)
(parse-feed source {:keys [format]})

Parse an Atom, RSS, or JSON Feed from string or input stream. Auto-detects format from content. Returns a map with feed data. Includes :format key (:atom, :rss, or :json-feed).

Options:

  • :format - Force format (:atom, :rss, or :json-feed), auto-detects if not specified
Parse an Atom, RSS, or JSON Feed from string or input stream.
Auto-detects format from content.
Returns a map with feed data. Includes :format key (:atom, :rss, or :json-feed).

Options:
- :format - Force format (:atom, :rss, or :json-feed), auto-detects if not specified
sourceraw docstring

parse-json-feedclj

(parse-json-feed source)

Parse a JSON Feed from JSON string or reader. Returns a Clojure map.

Parse a JSON Feed from JSON string or reader.
Returns a Clojure map.
sourceraw docstring

valid?clj

(valid? feed)
(valid? feed opts)

Quick check if a feed is valid. Returns true/false.

Quick check if a feed is valid. Returns true/false.
sourceraw docstring

validate-atom-feedclj

(validate-atom-feed feed)
(validate-atom-feed feed
                    {:keys [semantic? strict?]
                     :or {semantic? true strict? false}})

Validate an Atom feed specifically. Returns {:valid? bool :errors [...] :warnings [...] :feed map}.

Validate an Atom feed specifically. Returns {:valid? bool :errors [...] :warnings [...] :feed map}.
sourceraw docstring

validate-entryclj

(validate-entry entry)
(validate-entry entry
                {:keys [semantic? strict?] :or {semantic? true strict? false}})

Validate a single Atom entry. Returns {:valid? bool :errors [...] :warnings [...]}.

Arguments:

  • entry: A map with :id, :title, :updated, :links, etc.

Options:

  • :semantic? - Enable semantic checks (default true)
  • :strict? - Treat warnings as errors (default false)

Example: (validate-entry {:title "Morning Brief: Thursday, June 19" :updated "2026-06-19T00:00:00Z" :id "urn:uuid:123"})

Validate a single Atom entry. Returns {:valid? bool :errors [...] :warnings [...]}.

Arguments:
- entry: A map with :id, :title, :updated, :links, etc.

Options:
- :semantic? - Enable semantic checks (default true)
- :strict?   - Treat warnings as errors (default false)

Example:
  (validate-entry {:title "Morning Brief: Thursday, June 19"
                   :updated "2026-06-19T00:00:00Z"
                   :id "urn:uuid:123"})
sourceraw docstring

validate-feedclj

(validate-feed feed)
(validate-feed feed {:keys [format] :as opts})

Validate a feed (Atom, RSS, or JSON Feed). Auto-detects format from content. Returns {:valid? bool :errors [...] :warnings [...] :feed map}.

Arguments:

  • feed: Either a parsed feed map, XML string/input-stream, or JSON string

Options:

  • :semantic? - Enable semantic checks like day-of-week (default true, Atom only)
  • :strict? - Treat warnings as errors (default false)
  • :format - Force format (:atom, :rss, or :json-feed), auto-detects if not specified

Example: (validate-feed "<feed>...</feed>") ; Atom feed (validate-feed "<rss>...</rss>") ; RSS feed (validate-feed "{"version":...}") ; JSON Feed (validate-feed parsed-map {:semantic? false})

Validate a feed (Atom, RSS, or JSON Feed). Auto-detects format from content.
Returns {:valid? bool :errors [...] :warnings [...] :feed map}.

Arguments:
- feed: Either a parsed feed map, XML string/input-stream, or JSON string

Options:
- :semantic? - Enable semantic checks like day-of-week (default true, Atom only)
- :strict?   - Treat warnings as errors (default false)
- :format    - Force format (:atom, :rss, or :json-feed), auto-detects if not specified

Example:
  (validate-feed "<feed>...</feed>")     ; Atom feed
  (validate-feed "<rss>...</rss>")       ; RSS feed
  (validate-feed "{\"version\":...}")  ; JSON Feed
  (validate-feed parsed-map {:semantic? false})
sourceraw docstring

validate-json-feedclj

(validate-json-feed feed)
(validate-json-feed feed opts)

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 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\",...}")
sourceraw docstring

validate-json-itemclj

(validate-json-item item)
(validate-json-item item opts)

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)

Example: (validate-json-item {:id "1" :content_text "Hello world"})

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)

Example:
  (validate-json-item {:id "1" :content_text "Hello world"})
sourceraw docstring

versionclj

Library version, read from POM at runtime.

Library version, read from POM at runtime.
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