Open bergos opened 8 years ago
Starting to understand, thanks.
So graph.write(stream)
in the first example is the same as stream.pipe(graph)
?
@bergos I'll think of some examples, could you maybe just add one for serializer to match the parser one? This way we'll have a full round-trip
Besides reading and writing to file system, we could add example of parsing from HTTP request and serializing for HTTP response. I can give it a shot next week if no one else does it before that.
I've updated the rdf-examples repository. They should be now up to date with the current spec. Also there are now more scenarios like HTTP requests with fetch
and using the Store
interface.
@bergos what do you think about moving https://github.com/rdf-ext/rdf-examples to @rdfjs orga and slowly we could start transforming it into primer / playground?
@elf-pavlik now with the rdfjs Dataset interface it makes sense. As the rdf-ext interfaces sill provide some more methods than the rdfjs specs, I would like to keep it also in the rdf-ext org and remove examples covered in rdfjs.
Any proposal how to start? I think the structure could be also need a small cleanup. E.g. separate Node.js and Browser examples.
It would be easier to understand and discuss the stream interfaces PR if we would have some examples. Because the API may change during the discussion a wiki page would be the best place.
Streams Examples in the Wiki