Skip to content

option -t doesn't work #19

@VladimirAlexiev

Description

@VladimirAlexiev

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.

  • cons: you can't specify a context
  • pro: it infers a rich context, eg
    "rangeIncludes" : {
      "@id" : "http://schema.org/rangeIncludes",
      "@type" : "@id"
    },
  • cons: it renders lists with rdf:first, rdf:rest

See gs1/EPCIS#238 for discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions