You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm failing to perform round-trip conversions JSON-LD/RDF with WOT Thing Descriptions.
The pipeline should be: JSON-LD -> N-Quads -> expanded JSON-LD -> framed JSON-LD.
The conversion works with other libraries, you can even perform the pipeline using online tools like the LSON-LD Playground (for JSON-LD to N-Quads and Framing) and RDF Distiller (for N-Quads to JSON-LD).
I've been able to restrict the problem by using the following toy TD with a simplified context:
The conversion to N-Quads lead to a basically equal results using Titanium and RDF Distiller (the difference being that RDF Distiller also performs a compaction). Here is Titanium's version:
When I try to frame the results with the very same @context contained in the original JSON-LD (with the addition of "@type": "Thing") things fall apart.
JSON-LD Playground returns this document (@context omitted):
The only difference w.r.t. the options used in the various conversions is that for N-Quards to JSON-LD I had to set setUseNativeTypes to true in RDF Distiller otherwise the resulting JSON-LD cannot be framed correctly.
If I use the same option in Titanium things get even messier. But I think this is another problem. The relevant problem now is the final framing. I can make it work correctly with JSON-LD playground and I found no way for doing that with Titanium (of course I tried with various options, but no success).
To Reproduce
See above
Expected behavior
Same behavior as jsonld.js
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm failing to perform round-trip conversions JSON-LD/RDF with WOT Thing Descriptions.
The pipeline should be: JSON-LD -> N-Quads -> expanded JSON-LD -> framed JSON-LD.
The conversion works with other libraries, you can even perform the pipeline using online tools like the LSON-LD Playground (for JSON-LD to N-Quads and Framing) and RDF Distiller (for N-Quads to JSON-LD).
I've been able to restrict the problem by using the following toy TD with a simplified context:
The conversion using the JSON-LD playground and Titanium lead to the same result:
The conversion to N-Quads lead to a basically equal results using Titanium and RDF Distiller (the difference being that RDF Distiller also performs a compaction). Here is Titanium's version:
When I try to frame the results with the very same
@context
contained in the original JSON-LD (with the addition of"@type": "Thing"
) things fall apart.JSON-LD Playground returns this document (
@context
omitted):The conversion is online here.
Titanium, instead, returns:
The only difference w.r.t. the options used in the various conversions is that for N-Quards to JSON-LD I had to set
setUseNativeTypes
totrue
in RDF Distiller otherwise the resulting JSON-LD cannot be framed correctly.If I use the same option in Titanium things get even messier. But I think this is another problem. The relevant problem now is the final framing. I can make it work correctly with JSON-LD playground and I found no way for doing that with Titanium (of course I tried with various options, but no success).
To Reproduce
See above
Expected behavior
Same behavior as jsonld.js
The text was updated successfully, but these errors were encountered: