+1
.gitignore
+1
.gitignore
···
+44
.tangled/workflows/build.yml
+44
.tangled/workflows/build.yml
···
+28
dune-project
+28
dune-project
···
+14
example/dune
+14
example/dune
···
+25
example/example_feed.json
+25
example/example_feed.json
···+"content_html": "<p>We’ve updated the spec to <a href=\"https://jsonfeed.org/version/1.1\">version 1.1</a>. It’s a minor update to JSON Feed, clarifying a few things in the spec and adding a couple new fields such as <code>authors</code> and <code>language</code>.</p>\n\n<p>For version 1.1, we’re starting to move to the more specific MIME type <code>application/feed+json</code>. Clients that parse HTML to discover feeds should prefer that MIME type, while still falling back to accepting <code>application/json</code> too.</p>\n\n<p>The <a href=\"https://jsonfeed.org/code/\">code page</a> has also been updated with several new code libraries and apps that support JSON Feed.</p>\n",+"content_html": "\n\n<p>We — Manton Reece and Brent Simmons — have noticed that JSON has become the developers’ choice for APIs, and that developers will often go out of their way to avoid XML. JSON is simpler to read and write, and it’s less prone to bugs.</p>\n\n<p>So we developed JSON Feed, a format similar to <a href=\"http://cyber.harvard.edu/rss/rss.html\">RSS</a> and <a href=\"https://tools.ietf.org/html/rfc4287\">Atom</a> but in JSON. It reflects the lessons learned from our years of work reading and publishing feeds.</p>\n\n<p><a href=\"https://jsonfeed.org/version/1\">See the spec</a>. It’s at version 1, which may be the only version ever needed. If future versions are needed, version 1 feeds will still be valid feeds.</p>\n\n<h4 id=\"notes\">Notes</h4>\n\n<p>We have a <a href=\"https://github.com/manton/jsonfeed-wp\">WordPress plugin</a> and, coming soon, a JSON Feed Parser for Swift. As more code is written, by us and others, we’ll update the <a href=\"https://jsonfeed.org/code\">code</a> page.</p>\n\n<p>See <a href=\"https://jsonfeed.org/mappingrssandatom\">Mapping RSS and Atom to JSON Feed</a> for more on the similarities between the formats.</p>\n\n<p>This website — the Markdown files and supporting resources — <a href=\"https://github.com/brentsimmons/JSONFeed\">is up on GitHub</a>, and you’re welcome to comment there.</p>\n\n<p>This website is also a blog, and you can subscribe to the <a href=\"https://jsonfeed.org/xml/rss.xml\">RSS feed</a> or the <a href=\"https://jsonfeed.org/feed.json\">JSON feed</a> (if your reader supports it).</p>\n\n<p>We worked with a number of people on this over the course of several months. We list them, and thank them, at the bottom of the <a href=\"https://jsonfeed.org/version/1\">spec</a>. But — most importantly — <a href=\"http://furbo.org/\">Craig Hockenberry</a> spent a little time making it look pretty. :)</p>\n",
+162
example/feed_example.ml
+162
example/feed_example.ml
···
+193
example/feed_parser.ml
+193
example/feed_parser.ml
···
+303
example/feed_validator.ml
+303
example/feed_validator.ml
···
+34
jsonfeed.opam
+34
jsonfeed.opam
···+"This library implements the JSON Feed specification (version 1.1) for OCaml. JSON Feed is a syndication format similar to RSS and Atom, but using JSON instead of XML. The library provides type-safe parsing and serialization using Jsonm and Ptime."
+51
lib/attachment.ml
+51
lib/attachment.ml
···
+91
lib/attachment.mli
+91
lib/attachment.mli
···
+4
lib/dune
+4
lib/dune
+18
lib/hub.ml
+18
lib/hub.ml
···
+53
lib/hub.mli
+53
lib/hub.mli
···
+105
lib/item.ml
+105
lib/item.ml
···
+190
lib/item.mli
+190
lib/item.mli
···
+571
lib/jsonfeed.ml
+571
lib/jsonfeed.ml
···
+376
lib/jsonfeed.mli
+376
lib/jsonfeed.mli
···
+8
test/dune
+8
test/dune
+331
test/test_jsonfeed.ml
+331
test/test_jsonfeed.ml
···+Alcotest.(check (option string)) "avatar" (Some "https://example.com/avatar.png") (Author.avatar author);+Alcotest.(check (option int64)) "size_in_bytes" (Some 15_728_640L) (Attachment.size_in_bytes att);+Alcotest.(check (option int)) "duration_in_seconds" (Some 1800) (Attachment.duration_in_seconds att)+Alcotest.(check (option string)) "content_html" (Some "<p>Hello</p>") (Item.content_html item);+Alcotest.(check (option string)) "content_html" (Some "<p>Hello</p>") (Item.content_html item);+Alcotest.(check (option string)) "content_html" (Some "<p>Hello</p>") (Item.content_html item)
+32
test/test_serialization.ml
+32
test/test_serialization.ml
···
test/test_serialization.mli
test/test_serialization.mli
This is a binary file and will not be displayed.