https://github.com/sonicdoe/jsonfeed-validator
JSON Feed validator
https://github.com/sonicdoe/jsonfeed-validator
jsonfeed validator
Last synced: 11 days ago
JSON representation
JSON Feed validator
- Host: GitHub
- URL: https://github.com/sonicdoe/jsonfeed-validator
- Owner: sonicdoe
- License: isc
- Created: 2017-05-23T03:00:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-29T16:38:04.000Z (over 8 years ago)
- Last Synced: 2025-07-07T08:11:56.403Z (6 months ago)
- Topics: jsonfeed, validator
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonfeed-validator
[](https://www.npmjs.com/package/jsonfeed-validator)
[](https://travis-ci.org/sonicdoe/jsonfeed-validator)
> [JSON Feed](https://jsonfeed.org) validator
## Installation
```
$ npm install jsonfeed-validator --save
```
## Usage
```js
const validate = require('jsonfeed-validator')
const feed = {
version: 'https://jsonfeed.org/version/1',
title: 'My Example Feed',
home_page_url: 'https://example.org/',
feed_url: 'https://example.org/feed.json',
items: [
{
content_html: '
Hello, world!
',
url: 'https://example.org/initial-post'
}
]
}
const results = validate(feed)
/*
[
{
ruleId: 'schema',
message: 'should have required property \'id\' at path \'.items[0]\''
}
]
*/
```
### API
#### validate(feed)
##### feed
Type: `object`
JSON Feed to be validated.