rdflib icon indicating copy to clipboard operation
rdflib copied to clipboard

Inconsistent parse format default

Open ashleysommer opened this issue 4 years ago • 2 comments

We recently changed the Graph.parse() method's format parameter to default of turtle instead of XML. This is because turtle is now a much more popular file format for Graph data.

However we overlooked that the ConjunctiveGraph and Dataset classes each have their own overloaded parse() method, and they still use 'xml' as the default format if none is given.

The simple thing to do would be simply replace "xml" with "turtle" on those too, but looking closer that may not be wise. Because ConjuctiveGraph and Dataset are both multi-graph containers and Turtle is not multi-graph capable. So usually when you are doing ConjunctiveGraph.parse() you will not be expecting a turtle file, but more likely .trig or .jsonld.

Should we change the default format on these to something else, or leave it on XML?

ashleysommer avatar Feb 05 '21 07:02 ashleysommer

I think trig would be good

white-gecko avatar Feb 05 '21 07:02 white-gecko

Should we change the default format on these to something else, or leave it on XML?

Should be included in 7.0 as this would be breaking, but it should be done.

aucampia avatar Sep 23 '22 19:09 aucampia