mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-23 12:11:02 +02:00
Fixed quotaed triples
This commit is contained in:
parent
abff65431a
commit
86ca3edbfc
3 changed files with 6 additions and 3 deletions
|
|
@ -23,7 +23,8 @@ def to_value(x):
|
||||||
return Literal(x.get("v", ""))
|
return Literal(x.get("v", ""))
|
||||||
elif x.get("t") == TRIPLE:
|
elif x.get("t") == TRIPLE:
|
||||||
# Parse the nested triple from JSON or structured data
|
# Parse the nested triple from JSON or structured data
|
||||||
triple_data = x.get("v", "")
|
# Wire format uses "tr" key for nested triple dict
|
||||||
|
triple_data = x.get("tr") or x.get("v", "")
|
||||||
if isinstance(triple_data, str):
|
if isinstance(triple_data, str):
|
||||||
import json
|
import json
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ def to_value(x):
|
||||||
return Literal(x.get("v", ""))
|
return Literal(x.get("v", ""))
|
||||||
elif x.get("t") == TRIPLE:
|
elif x.get("t") == TRIPLE:
|
||||||
# Parse the nested triple from JSON or structured data
|
# Parse the nested triple from JSON or structured data
|
||||||
triple_data = x.get("v", "")
|
# Wire format uses "tr" key for nested triple dict
|
||||||
|
triple_data = x.get("tr") or x.get("v", "")
|
||||||
if isinstance(triple_data, str):
|
if isinstance(triple_data, str):
|
||||||
import json
|
import json
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ def to_value(x):
|
||||||
return Literal(x.get("v", ""))
|
return Literal(x.get("v", ""))
|
||||||
elif x.get("t") == TRIPLE:
|
elif x.get("t") == TRIPLE:
|
||||||
# Parse the nested triple from JSON or structured data
|
# Parse the nested triple from JSON or structured data
|
||||||
triple_data = x.get("v", "")
|
# Wire format uses "tr" key for nested triple dict
|
||||||
|
triple_data = x.get("tr") or x.get("v", "")
|
||||||
if isinstance(triple_data, str):
|
if isinstance(triple_data, str):
|
||||||
import json
|
import json
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue