Skip to content

Consider objectify/link API method #140

Closed
@gkellogg

Description

@gkellogg

Objectify is a mechanism proposed to turn JSON-LD into JavaScript (or other host language) objects with subject references replaced with links to actual objects. Originally proposed by @jmandel in issue #109 as a means of flattening a graph, applying a context, and replacing subject references with in-memory object links.

Alternate names have been suggested, as no-one's thrilled with objectify.

  • graphify would make it clear that we're turning a tree into a graph
  • link goes along with the notion of object linking implied in the name JSON-LD, and uses the term linking to apply to in-memory links as well as external links.
  • connect has the connotation of connecting references together.

Given that we've adopted a flatten API method already, partly to help support framing, and context application is implied in expansion, compaction and flattening already, the objectify API method really only need concern itself with replacing subject references with in-memory references.

Conversation took place on the June 26, 2012 telecon.

Search

For objectify to serve as a potential replacement for framing, we also need to have a means of surfacing nodes within a graph.

  • JSON Select is one tool that can be used to generically select JSON, similar to using CSS selectors.
  • BGP An implementation of BGP against JavaScript data structures would provide a normative path to full SPARQL query support of JSON-LD graphs, in this case, using framing-like syntax to define JSON structures which would be used for matching against JavaScript objects.

Concerns

Need to make sure code doesn't cycle when traversing such graphs, but if we flatten first, and keep track of visited nodes, this should ensure we don't loop.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions