Skip to content

Commit

Permalink
Merge pull request #1403 from ajnelson-nist/add-json-ld-to-guess-format
Browse files Browse the repository at this point in the history
Add JSON-LD to guess_format()
  • Loading branch information
nicholascar authored Sep 10, 2021
2 parents 2721658 + e778e94 commit fd935e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rdflib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ def parse_date_time(val):
"svg": "rdfa",
"nq": "nquads",
"trig": "trig",
"json": "json-ld",
"jsonld": "json-ld",
}


Expand All @@ -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')
Expand Down

0 comments on commit fd935e2

Please sign in to comment.