我们有一个需求,我们将以JSON-LD格式存储数据以维护目录,并将目录中的数据批量拉到支持RDF数据格式的图形数据库中。为此,我们一直在研究Cayley和DBgraph,但这些数据库支持N-Quads作为其数据格式。
是否存在具有JSON-LD数据格式的图形数据库,或者是否有方法将JSON-LD格式转换为N-Quads/Turtle格式?
发布于 2018-01-18 12:48:35
将JSON-LD转换为N-Quads (来回转换)是JSON-LD API规范中描述的核心算法。任何符合JSON-LD标准的处理器都支持这一点。
发布于 2018-02-20 18:00:48
jsonld 提供了一个将标准化为其他RDF格式的选项。
# normalize a document using the RDF Dataset Normalization Algorithm
# (URDNA2015), see: http://json-ld.github.io/normalization/spec/
normalized = jsonld.normalize(
doc, {'algorithm': 'URDNA2015', 'format': 'application/nquads'})
# normalized is a string that is a canonical representation of the document
# that can be used for hashing, comparison, etc.以下是链接:
https://stackoverflow.com/questions/48275500
复制相似问题