-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSONfeed: validate the presence of content_html or content_text
The spec says that at least one element is mandatory. Verify this and raise an exception if both are missing. Signed-off-by: Beat Bolli <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"__TEST__": "Description: basic JSON tests Expect: bozo and 'neither' in str(bozo_exception) -->", | ||
"version": "https://jsonfeed.org/version/1", | ||
"title": "no content", | ||
"home_page_url": "https://example.org/", | ||
"feed_url": "https://example.org/feed.json", | ||
"icon": "https://example.org/feed.png", | ||
"author": { "name": "me" }, | ||
"items": [ | ||
{ | ||
"id": "1", | ||
"author": { "name": "you", "url": "http://example.net/~you" }, | ||
"summary": "Hello, world!\n", | ||
"url": "https://example.org/initial-post" | ||
} | ||
] | ||
} |