digitalbazaar / jsonld.js

A JSON-LD Processor and API implementation in JavaScript
https://json-ld.org/
Other
1.66k stars 195 forks source link

expanding array from json #383

Open LucaCerina opened 4 years ago

LucaCerina commented 4 years ago

Hello, I am kind of a newbie into JSON-LD, so pardon me if I am asking something trivial. I want to map similar data coming from different JSON responses (non LD, just REST results) and so I want to use expansion and subsequent compaction to uniform them.

One document is like: "sleep" : [ {"value1":87, "value2": "ok"}, {"value1":55, "value2": "no"}, ... ] I am not sure if I need framing @graph or @list/@set to manage this problem. Unfortunately the documentation examples on expansion of non-LD json documents are a bit opaque.

Thanks for the help.