Turtle files should not be parsed and re-serialized on GET
Turtle files should not be parsed and re-serialized (unless you have to convert format) on GET because:
- It takes time to do,
- people also may want to save a file including comments
- people may want to save a file and note its hash or sign it.
Example: This file uses a namepsace for foaf: in the original:
$ curl https://timbl.databox.me/solid/issues/state.ttl @prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# .
<> http://xmlns.com/foaf/0.1/principalSubject <#this> .
$
I mentioned this in gitter/gold
When I order the workspaces in my preferences file, and PUT it back, and then GET, the prefs again, it appears to be alphabetically reordered. Tested on databox.me.
@deiu confirmed that it will be changed.
@csarven that doesn't really matter. Turtle does not guarantee you that triples will be ordered.
@deiu I'm strictly talking about the file level. While the order is not guaranteed for RDF formats, is there a UC why gold needs to take extra step to re-serialize instead of just serving the file?
No, it's just the way it was implemented a while ago. It will not sniff in the future versions.
But clients can not trust that the serialisation does not change as long as this behavior is not specified...