Skip to content

omit doesn't work for multiple objects #316

@garpinc

Description

@garpinc

I'm getting back following even though I've specified to omit graph

{
  "@context" : [ "http://cambridgesemantics.com/ontologies/2018/06/MetadataDictionary/ClassConcept", "http://cambridgesemantics.com/ontologies/2018/06/MetadataDictionary/PrimaryKey", "http://cambridgesemantics.com/ontologies/2018/06/MetadataDictionary/MetadataDictionary" ],
  "@graph" : [ {
    "uri" : "http://test1",
    "type" : "metaframe:MetadataDictionary",
    "metaDataConcepts" : {
      "uri" : "http://testc1",
      "type" : "metaframe:ClassConcept",
      "primaryKey" : [ {
        "uri" : "http://pk1",
        "type" : "metaframe:PrimaryKey",
        "priority" : "5"
      }, {
        "uri" : "http://pk2",
        "type" : "metaframe:PrimaryKey",
        "priority" : "6"
      } ]
    },
    "title" : "test1"
  }, {
    "uri" : "http://test2",
    "type" : "metaframe:MetadataDictionary",
    "title" : "test2"
  } ]
}

I see

2.3.4 Omit graph flag
The omit graph flag determines if framed output containing a single node object is contained within @graph, or not. The initial value for the omit graph flag is set using the omitGraph option, or based on the processing mode; if processing mode is json-ld-1.0, the output always includes a @graph member, otherwise, the @graph member is used only to describe multiple node objects, consistent with compaction. See § 4.2.2 Framing Algorithm for a further discussion.

which seems to indicate "@graph member is used only to describe multiple node".. But what do I do if I want no graph at all and I just want a list of the objects?

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