[Python-modules-commits] [python-pyld] 219/276: Check useRdfType flag.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:48:13 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository python-pyld.

commit 70806683e22e0dd93759368d6529732d067fd6be
Author: Dave Longley <dlongley at digitalbazaar.com>
Date:   Wed Oct 2 15:51:24 2013 -0400

    Check useRdfType flag.
---
 lib/pyld/jsonld.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 881d4e1..03c1efe 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -2223,7 +2223,8 @@ class JsonLdProcessor:
                 if object_is_id and o['value'] not in node_map:
                     node_map[o['value']] = {'@id': o['value']}
 
-                if p == RDF_TYPE and object_is_id:
+                if (p == RDF_TYPE and not options.get('useRdfType', False) and
+                        object_is_id):
                     JsonLdProcessor.add_value(
                         node, '@type', o['value'], {'propertyIsArray': True})
                     continue

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git



More information about the Python-modules-commits mailing list