diff options
author | Nicholas Car <nicholas.car@surroundaustralia.com> | 2021-09-10 10:06:41 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 10:06:41 +1000 |
commit | fd935e2a7480d19a0c03a6757107767f94c01acd (patch) | |
tree | 14a42572ce95e35fe900d0536361a19b5e6b3627 | |
parent | 27216580449033a11b2552cc2f9ff6f9aaedabd8 (diff) | |
parent | e778e9413510721c2fedaae56d4ff826df265c30 (diff) | |
download | rdflib-fd935e2a7480d19a0c03a6757107767f94c01acd.tar.gz |
Merge pull request #1403 from ajnelson-nist/add-json-ld-to-guess-format
Add JSON-LD to guess_format()
-rw-r--r-- | rdflib/util.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rdflib/util.py b/rdflib/util.py index fe32c7f2..28ca0836 100644 --- a/rdflib/util.py +++ b/rdflib/util.py @@ -364,6 +364,8 @@ SUFFIX_FORMAT_MAP = { "svg": "rdfa", "nq": "nquads", "trig": "trig", + "json": "json-ld", + "jsonld": "json-ld", } @@ -378,6 +380,8 @@ def guess_format(fpath, fmap=None): 'xml' >>> guess_format('path/to/file.ttl') 'turtle' + >>> guess_format('path/to/file.json') + 'json-ld' >>> guess_format('path/to/file.xhtml') 'rdfa' >>> guess_format('path/to/file.svg') |