-
Current parsers and serializers are configured with base_uri as their property. Instead it would be natural to take base_uri as an attribute of document to be parsed/serialized. Thus one parser/serializer instance can operate over any number of docs. Essentially uri is a property of the document. For example, json-ld interface defines a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
But that being said, having an abstraction similar to JSON-LD's |
Beta Was this translation helpful? Give feedback.
BufRead
is very pervasive in Rust, so I would rather keep them as a possible input for parsers. And therefore (sinceBufRead
s don't carry their origin URL), having a default base IRI in the parser configuration makes sense.But that being said, having an abstraction similar to JSON-LD's
RemoteDocument
, that attaches metadata (such as origin URL) to the data to be parsed, sounds indeed like a good idea. Parsers implementations could accept eitherBufRead
of this abstraction.