json-ld
json-ld copied to clipboard
relax content-type detection rules to allow prefix-match
Hi, thanks for the crate!~
When I tried to use ReqwestLoader
, I've noticed that it doesn't parse my input at all, because in my case server sends the header like that: Content-Type: application/ld+json; charset=UTF-8
(MDN docs confirms that it's kinda standard), which is of course won't be matched.
So I've changed is_json_media_type
to just do starts_with
matching which should handle both old and new cases.