digitalbazaar / jsonld-cli

JSON-LD command line interface tool
Other
48 stars 7 forks source link

option `-t` doesn't work #19

Open VladimirAlexiev opened 3 years ago

VladimirAlexiev commented 3 years ago

I've tried many different ways to specify the format of input and couldn't. As a result, jsonld 0.3.0 cannot convert RDF to JSONLD, only the opposite direction.

This is a MAJOR bug.

>jsonld format EPCIS.nq
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.nq"
}

>jsonld format -t application/n-quads EPCIS.nq
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.nq"
}

>jsonld format -t application/nquads EPCIS.nq
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.nq"
}

>jsonld format -t nquads EPCIS.nq
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.nq"
}

>jsonld format -t nq EPCIS.nq
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.nq"
}

And similar for a Turtle file:

>jsonld format EPCIS.ttl
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.ttl"
}

>jsonld format -t text/turtle EPCIS.ttl
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.ttl"
}

>jsonld format -t ttl EPCIS.ttl
[object Object]
Error: {
  "message": "Unable to auto-detect format.",
  "url": "EPCIS.ttl"
}

So I use riot for RDF->JSONLD.

See https://github.com/gs1/EPCIS/issues/238 for discussion

VladimirAlexiev commented 1 year ago