Skip to main content

This is a preview release of a JSON Feed validator

Example

>>> import requests
>>> from jsonfeedvalidator import validate_feed, format_errors, ErrorTree
>>> resp = requests.get("https://daringfireball.net/feeds/json")
>>> validate_feed(resp.json())
[]
>>> feed = {"items": [{"attachments": [{}]}]}
>>> errors = validate_feed(feed)
>>> format_errors(feed, ErrorTree(errors))
{
    'items': {
        0: {
            'errors': {
                'required': [
                    "'id' is a required property"
                ]
            },
            'attachments': {
                0: {
                    'errors': {
                        'required': [
                            "'mime_type' is a required property",
                            "'url' is a required property"
                        ]
                    }
                }
            }
        }
    },
    'errors': {
        'required': [
            "'title' is a required property",
            "'version' is a required property"
        ]
    }
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsonfeedvalidator-0.0.3.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file jsonfeedvalidator-0.0.3.tar.gz.

File metadata

File hashes

Hashes for jsonfeedvalidator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6854fc38c92975f1476f6bd647eac744c83677530671c08bbf05ef35f43f8021
MD5 1b6a2a305b9b55a1a377781db8d0ce66
BLAKE2b-256 84166a27863827b4b1636b9fc80269526a0499f5133b0c92b6ca1bef957bfed6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page