json-ld / ndjson-ld Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
On the call, I think we discussed that blank nodes would be scoped to each individual record, however this would make using this format in a manner similar to N-Quads unable to represent shared blank nodes.
Most serializations scope blank node identifiers to the file. In this reckoning:
{"@id": "foo", "prop": {"@id": "_:bar"}}
{"@id": "_:bar", "prop": {"@id": "baz"}}
could be semantically equivalent to:
{"@id": "foo", "prop": {"@id": "_:bar", "prop": {"@id": "baz"}}}
Otherwise, there would be no way to state this using independent records.
Proposal: blank node labels are shared across all documents within a stream.
Similar to how it's done in the YAML-LD spec, the spec should mirror the JSON-LD API WebIDL definitions, and largely delegate each line to the JSON-LD API.
This requires extending the JSON-LD Internal Representation with the notion of a document type with a sequence being an array of documents with a document consisting of either an array or map.
From json-ld/yaml-ld#63, there are at least three different formats that could serve as the basis for this work:
application/x+ndjson
, which is not recommended. It purports to be a living spec. Previous support for comments between records, now removed.application/x+jsonlines
and application/x-json-stream
. Otherwise, virtually indistinguishable from NDJSON.application/json-seq
. Allows newlines within JSON records, but requires records be proceeded by an ASCII Record Separator (%x1E). A disadvantage is that this is not as amenable to presentation or editing by a common text editor.I have seen a number of possible use cases expressed in various repos, email threads, etc.
Given that we could use these to help us gather the specific set of requirements that any new specification/standard needs to support - perhaps we should start here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.