Re: Ndjson vs. JSONLines?

Hi Pierre-Antoine and co,

LDES (https://w3id.org/ldes/specification) together with TREE 
(https://w3id.org/tree/specification) is an RDF vocabulary to describe 
collections and members that are part of that collection. An 
ldes:EventStream is a tree:Collection with immutable members and thus a 
“log” that always grows.

Simple example of something that is an LDES:

**

****

**<C1>aldes:EventStream;**

**

tree:member<streetname1-v1>, <streetname1-v2>.

<streetname1-v1>rdfs:label"Station Road";

**

*dcterms:isVersionOf<streetname1>;*

*

dcterms:created"2020-01-01T00:10:00Z"^^xsd:dateTime

*

*
<streetname1-v2>rdfs:label"Station Square";dcterms:isVersionOf<streetname1>;

dcterms:created"2021-01-10T00:10:00Z"^^xsd:dateTime .*

Using TREE you can then say that this is the first page of the LDES, and 
that tree:Relations exist towards other pages. Using these relation 
objects, you can then describe what you can find on that page: e.g., 
everything later in time than a certain timestamp, or everything within 
a geospatial area, or all members with an rdfs:label that contains a 
certain substring, etc.

This means that, in comparison to streamed JSON-LD, that LDES is:

  1. independent from serialization

  2. making containment explicit using RDF: you need to say you’re part 
of a stream using tree:member and describe the event stream as a kind of 
dcat:Dataset

  3. using TREE to also describe how structures of interlinked pages 
publish that event stream, and one stream can be published using 
multiple “views” (e.g., a Triple Pattern Fragments, a SPARQL endpoint, a 
substring fragmentation, etc.)

I’d say the goal is thus different and maybe even complementary. I see 
value in streamed JSON-LD as a convience mechanism to just append JSON 
to a file and still being able to automatically translate the full file 
to RDF quads. You need more than just NLDJSON as you also want to be 
more efficient and or example not repeat the @context on each write.

Kind regards,

Pieter

On 12/10/2022 21.12, Pierre-Antoine Champin wrote:
> On 12/10/2022 19:42, Pieter Colpaert wrote:
>>
>> Hi all,
>>
>> I don’t know of anyone using this, but just for reference, I’ve also 
>> implemented something similar in the past:
>>
>> https://github.com/pietercolpaert/jsonld-stream
>>
> Thanks Pieter,
>
> interesting coincidence: my attention has been brought recently to LDES
>
> https://semiceu.github.io/LinkedDataEventStreams/
>
> and I was wondering if some form of "streamed JSON-LD" could be useful 
> in that context.
>
> Any thought?
>
>   pa
>
>> Kind regards,
>>
>> Pieter
>>
>> On 06/10/2022 14.37, Leonard Rosenthol wrote:
>>>
>>> Thanks Gregg!   I’ll check the issue and will certainly try to join 
>>> the mtg.
>>>
>>> Leonard
>>>
>>> *From: *Gregg Kellogg <gregg@greggkellogg.net>
>>> *Date: *Tuesday, October 4, 2022 at 5:52 PM
>>> *To: *Leonard Rosenthol <lrosenth@adobe.com>
>>> *Cc: *public-json-ld-wg@w3.org <public-json-ld-wg@w3.org>, JSON for 
>>> Linking Data Community Group <public-linked-json@w3.org>
>>> *Subject: *Re: Ndjson vs. JSONLines?
>>>
>>> *EXTERNAL: Use caution when clicking on links or opening attachments.*
>>>
>>> (CC’ing the CG, as this is really a CG issue rather than a WG issue 
>>> at this point).
>>>
>>> In fact, we identified three different sources, including NDJSON, 
>>> JSON Lines and JSON Sequences. In fact, any of these could be a good 
>>> starting point. See issue 63 for some background [1].
>>>
>>> The name for the repo was fairly arbitrary, and perhaps needs some 
>>> more discussion.
>>>
>>> We have a slot for it on our call next Wednesday [2], perhaps you’d 
>>> like to join to discuss?
>>>
>>> Gregg Kellogg
>>> gregg@greggkellogg.net
>>>
>>> [1] https://github.com/json-ld/yaml-ld/issues/63 
>>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjson-ld%2Fyaml-ld%2Fissues%2F63&data=05%7C01%7CPieter.Colpaert%40ugent.be%7C4d2c295e3484485905a308daa797b3c3%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638006567252110925%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SRe%2FWz9GUz%2FpemNcuAqW4ur8NAvVL8zIay12sOuC6C8%3D&reserved=0>
>>>
>>> [2] 
>>> https://www.w3.org/events/meetings/164de972-9959-44a0-a925-3905f7685c0f/20221012T120000#agenda 
>>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2Fevents%2Fmeetings%2F164de972-9959-44a0-a925-3905f7685c0f%2F20221012T120000%23agenda&data=05%7C01%7CPieter.Colpaert%40ugent.be%7C4d2c295e3484485905a308daa797b3c3%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638006567252267158%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nNfG3tP%2F5bDwunAlpURfX%2BE9xFSu%2B5hOz7BK2hvsuW0%3D&reserved=0>
>>>
>>>
>>>
>>>     On Oct 4, 2022, at 1:36 PM, Leonard Rosenthol
>>>     <lrosenth@adobe.com> wrote:
>>>
>>>     I was previously aware ofhttps://jsonlines.org/
>>>     <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjsonlines.org%2F&data=05%7C01%7CPieter.Colpaert%40ugent.be%7C4d2c295e3484485905a308daa797b3c3%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638006567252267158%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=t1k0CKkF4U%2B27yFJrdWE0Jriz2oO%2F5sLf37fTN1s%2BeE%3D&reserved=0>-
>>>     but see that we are discussion NDJSON.
>>>
>>>     What’s the difference?  Why one over the other?
>>>
>>>     Leonard
>>>
>> -- 
>> https://pietercolpaert.be
>> +32486747122

-- 
https://pietercolpaert.be
+32486747122

Received on Monday, 17 October 2022 10:32:31 UTC