[Python-modules-commits] [python-pyld] 275/276: Skip array processing for keywords that aren't @graph or @list.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:48:19 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 1e57f3ab3772a77b1bf3c60ff4ba68c7341cb89a
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Wed Oct 1 19:24:18 2014 -0400
Skip array processing for keywords that aren't @graph or @list.
---
lib/pyld/jsonld.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index fae4e15..3fe17be 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -1648,6 +1648,15 @@ class JsonLdProcessor:
JsonLdProcessor.add_value(rval, alias, expanded_value)
continue
+ # skip array processing for keywords that aren't @graph or @list
+ if(expanded_property != '@graph' and
+ expanded_property != '@list' and
+ _is_keyword(expanded_property)):
+ # use keyword alias and add value as is
+ alias = self._compact_iri(active_ctx, expanded_property)
+ JsonLdProcessor.add_value(rval, alias, expanded_value)
+ continue
+
# Note: expanded value must be an array due to expansion
# algorithm.
--
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