Skip to content

Missing information after db.jsonld.get() #56

@BigBlueHat

Description

@BigBlueHat

@jmatsushita here's a case in point from my BigBlueHat/page-notes#9 digging...

.put()ing this JSON-LD...

{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno9",
  "type": "Annotation",
  "body": [
    "http://example.org/description1",
    {
      "type": "TextualBody",
      "value": "tag1"
    }
  ],
  "target": [
    "http://example.org/image1",
    "http://example.org/image2",
    {
      "source": "http://example.org/"
    }
  ]
}

...and then:

db.jsonld.get('http://example.org/anno9', {}, (err, obj) => console.log(JSON.stringify(obj, null, '  '));

...gets me this...

{
  "@id": "http://example.org/anno9",
  "@type": "http://www.w3.org/ns/oa#Annotation",
  "http://www.w3.org/ns/oa#hasBody": {
    "@id": "http://example.org/description1"
  },
  "http://www.w3.org/ns/oa#hasTarget": [
    {
      "@id": "http://example.org/image1"
    },
    {
      "@id": "http://example.org/image2"
    }
  ]
}

So. The 2 blank nodes disappeared--which is where I'm beginning to think the bug/issue is (possibly with levelgraph-jsonld).

However, on the JSON-LD Playground things work as they should and I've essentially got the same JSON-LD back.

The issue is the same when passing in a @context (the one from the original .put() for simplicity):

{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "undefined": [
    "http://example.org/anno9",
    "Annotation"
  ],
  "body": "http://example.org/description1",
  "target": [
    "http://example.org/image1",
    "http://example.org/image2"
  ]
}

Blank nodes gone missing again...

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