Skip to content

Commit f7d04ee

Browse files
committed
Recognize .jsonld extension
IANA lists `application/ld+json` as a media type, including the `.jsonld` file extension, here: https://www.iana.org/assignments/media-types/application/ld+json via https://www.iana.org/assignments/media-types/media-types.xhtml via https://w3c.github.io/json-ld-syntax/#iana-considerations Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 88d8822 commit f7d04ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

case_utils/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def guess_format(fpath, fmap=None):
3737
updated_fmap = {key:rdflib.util.SUFFIX_FORMAT_MAP[key] for key in rdflib.util.SUFFIX_FORMAT_MAP}
3838
if not "json" in updated_fmap:
3939
updated_fmap["json"] = "json-ld"
40+
if not "jsonld" in updated_fmap:
41+
updated_fmap["jsonld"] = "json-ld"
4042
else:
4143
updated_fmap = {k:fmap[k] for k in fmap}
4244

0 commit comments

Comments
 (0)