Skip to content

Why do resultsSerializers require a stream vs returning value? #2170

@gdbassett

Description

@gdbassett

I feel like I'm missing some obvious reason why JSONResultSerializer wouldn't just return the stringified json object (r

r = json.dumps(res, allow_nan=False, ensure_ascii=False)
) vs requiring a stream. It seems simply leaving stream empty (and defaulting to None) would be a simple way to do this.

Is there some over riding reason to require the results be steamed out?

(Also is there any good examples of using results parsers and serializers? I've had substantial issues finding them.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    SPARQLbreaking changeThis involves or proposes breaking RDFLib's public API.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions