Skip to content

rdflib.plugins.stores.sparqlstore.SPARQLStore remove returnFormat=XML #819

@wonkydonky

Description

@wonkydonky

The class SPARQLStore calls this init from the NSSPARQLWrapper superclass

super(SPARQLStore, self).__init__(endpoint, returnFormat=XML, **sparqlwrapper_kwargs)

the problem is that this doesn't allow any other return format other than XML (for example, JSON). The reason is:

  • returnFormat=XML sets the default returnFormat upstream to XML
  • the query() functions resets the query setup at every query, using self.resetQuery()

so, even if I call setReturnFormat() from the base class SPARQLWrapper, it has no effect. Results always return as XML. By removing returnFormat=XML, I should be allowed to call SPARQLStore like this

SPARQLStore (endpoint='...', returnFormat=JSON

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions