+1
.ocamlformat
+1
.ocamlformat
···
+1
.tangled/workflows/build.yml
+1
.tangled/workflows/build.yml
+11
CHANGES.md
+11
CHANGES.md
+11
-1
README.md
+11
-1
README.md
···
+3
-3
dune-project
+3
-3
dune-project
···
+5
example/dune
+5
example/dune
+33
example/feed_echo.ml
+33
example/feed_echo.ml
···
+95
-105
example/feed_example.ml
+95
-105
example/feed_example.ml
············
+88
-88
example/feed_parser.ml
+88
-88
example/feed_parser.ml
···············
+28
-298
example/feed_validator.ml
+28
-298
example/feed_validator.ml
···
+4
-3
jsonfeed.opam
+4
-3
jsonfeed.opam
······
+1
jsonfeed.opam.template
+1
jsonfeed.opam.template
···
+24
-40
lib/attachment.ml
+24
-40
lib/attachment.ml
······-let create ~url ~mime_type ?title ?size_in_bytes ?duration_in_seconds ?(unknown = Unknown.empty) () =······-enc = fun (type acc) (f : Jsont.Meta.t -> string -> Jsont.json -> acc -> acc) unknown (acc : acc) ->
+27
-32
lib/attachment.mli
+27
-32
lib/attachment.mli
············
+5
-12
lib/cito.ml
+5
-12
lib/cito.ml
·········
+82
-79
lib/cito.mli
+82
-79
lib/cito.mli
···
+8
-34
lib/hub.ml
+8
-34
lib/hub.ml
···-enc = fun (type acc) (f : Jsont.Meta.t -> string -> Jsont.json -> acc -> acc) unknown (acc : acc) ->
+7
-17
lib/hub.mli
+7
-17
lib/hub.mli
············
+67
-85
lib/item.ml
+67
-85
lib/item.ml
···············-enc = fun (type acc) (f : Jsont.Meta.t -> string -> Jsont.json -> acc -> acc) unknown (acc : acc) ->
+14
-23
lib/item.mli
+14
-23
lib/item.mli
············
+31
-55
lib/jsonfeed.ml
+31
-55
lib/jsonfeed.ml
············-enc = fun (type acc) (f : Jsont.Meta.t -> string -> Jsont.json -> acc -> acc) unknown (acc : acc) ->············
+157
-28
lib/jsonfeed.mli
+157
-28
lib/jsonfeed.mli
···············
+5
-25
lib/reference.ml
+5
-25
lib/reference.ml
······-enc = fun (type acc) (f : Jsont.Meta.t -> string -> Jsont.json -> acc -> acc) unknown (acc : acc) ->
+25
-29
lib/reference.mli
+25
-29
lib/reference.mli
···-@see <https://github.com/egonw/JSONFeed-extensions/blob/main/references.md> References Extension Specification···············
+8
-10
lib/rfc3339.ml
+8
-10
lib/rfc3339.ml
···
+4
-5
lib/rfc3339.mli
+4
-5
lib/rfc3339.mli
······
+30
test/data/complete_valid.json
+30
test/data/complete_valid.json
···
+5
test/data/extra_comma.json
+5
test/data/extra_comma.json
+11
test/data/invalid_date_format.json
+11
test/data/invalid_date_format.json
+10
test/data/invalid_hub_type.json
+10
test/data/invalid_hub_type.json
+16
test/data/invalid_nested_attachment.json
+16
test/data/invalid_nested_attachment.json
···
+5
test/data/malformed_json.json
+5
test/data/malformed_json.json
+5
test/data/minimal_valid.json
+5
test/data/minimal_valid.json
+10
test/data/missing_item_content.json
+10
test/data/missing_item_content.json
+9
test/data/missing_item_id.json
+9
test/data/missing_item_id.json
+4
test/data/missing_items.json
+4
test/data/missing_items.json
+4
test/data/missing_title.json
+4
test/data/missing_title.json
+4
test/data/missing_version.json
+4
test/data/missing_version.json
+19
test/data/mixed_content.json
+19
test/data/mixed_content.json
···
+9
test/data/with_extensions.json
+9
test/data/with_extensions.json
+6
test/data/wrong_type_expired.json
+6
test/data/wrong_type_expired.json
+7
test/data/wrong_type_items.json
+7
test/data/wrong_type_items.json
+5
test/data/wrong_type_title.json
+5
test/data/wrong_type_title.json
+5
test/data/wrong_type_version.json
+5
test/data/wrong_type_version.json
+10
test/dune
+10
test/dune
+386
-159
test/test_jsonfeed.ml
+386
-159
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)···
+111
test/test_location_errors.ml
+111
test/test_location_errors.ml
···+{|{"status":"error","message":"%s","location":{"file":"%s","line":%d,"column":%d,"byte_start":%d,"byte_end":%d},"context":"%s"}|}
+127
test/test_locations.t
+127
test/test_locations.t
···+{"status":"error","message":"Missing member title in JSON Feed object","location":{"file":"data/missing_title.json","line":1,"column":1,"byte_start":0,"byte_end":65},"context":"$"}+{"status":"error","message":"Missing member version in JSON Feed object","location":{"file":"data/missing_version.json","line":1,"column":1,"byte_start":0,"byte_end":51},"context":"$"}+{"status":"error","message":"Missing member items in JSON Feed object","location":{"file":"data/missing_items.json","line":1,"column":1,"byte_start":0,"byte_end":83},"context":"$"}+{"status":"error","message":"Missing member id in Item object","location":{"file":"data/missing_item_id.json","line":5,"column":5,"byte_start":108,"byte_end":161},"context":"$.items[0]"}+{"status":"error","message":"Item must have at least one of content_html or content_text","location":{"file":"-","line":-1,"column":1,"byte_start":-1,"byte_end":-1},"context":"$.items[0]"}+{"status":"error","message":"Expected string but found number","location":{"file":"data/wrong_type_version.json","line":2,"column":14,"byte_start":15,"byte_end":15},"context":"$.version"}+{"status":"error","message":"Expected array<Item object> but found object","location":{"file":"data/wrong_type_items.json","line":4,"column":12,"byte_start":102,"byte_end":102},"context":"$.items"}+{"status":"error","message":"Expected string but found bool","location":{"file":"data/wrong_type_title.json","line":3,"column":12,"byte_start":62,"byte_end":62},"context":"$.title"}+{"status":"error","message":"Expected bool but found string","location":{"file":"data/wrong_type_expired.json","line":4,"column":14,"byte_start":111,"byte_end":111},"context":"$.expired"}+{"status":"error","message":"RFC 3339 timestamp: invalid RFC 3339 timestamp: \"not-a-valid-date\"","location":{"file":"-","line":-1,"column":1,"byte_start":-1,"byte_end":-1},"context":"$.items[0].date_published"}+{"status":"error","message":"Expected Author object but found string","location":{"file":"data/invalid_author_type.json","line":5,"column":5,"byte_start":109,"byte_end":109},"context":"$.authors[0]"}+{"status":"error","message":"Expected string but found number","location":{"file":"data/invalid_nested_attachment.json","line":11,"column":24,"byte_start":296,"byte_end":296},"context":"$.items[0].attachments[0].mime_type"}+{"status":"error","message":"Missing member url in Hub object","location":{"file":"data/invalid_hub_type.json","line":5,"column":5,"byte_start":103,"byte_end":132},"context":"$.hubs[0]"}+{"status":"error","message":"Expected object member but found }","location":{"file":"data/extra_comma.json","line":5,"column":1,"byte_start":105,"byte_end":105},"context":"$"}+{"status":"error","message":"Expected , or } after object member but found: \"","location":{"file":"data/malformed_json.json","line":3,"column":3,"byte_start":52,"byte_end":52},"context":"$"}
+10
-12
test/test_serialization.ml
+10
-12
test/test_serialization.ml
···