Skip to content

reworked documentation of JSONLDSerializer.#3323

Open
WhiteGobo wants to merge 2 commits intoRDFLib:7.xfrom
WhiteGobo:DocumentationSerializerJSONLD
Open

reworked documentation of JSONLDSerializer.#3323
WhiteGobo wants to merge 2 commits intoRDFLib:7.xfrom
WhiteGobo:DocumentationSerializerJSONLD

Conversation

@WhiteGobo
Copy link
Contributor

@WhiteGobo WhiteGobo commented Nov 21, 2025

Still work in correspondence to #3307.
Added missing documentation arguments.
Working towards that all arguments are accesible with inspect.

Summary of changes

Added more documentation to module and JsonLDSerializer.serialize.
Moved Arguments to serialize arguments, instead of extracting them from **args.
No functional change, but because i dont extract anything from **args anymore, there are some changes in the program code.
Still missing explanation to argument context.
Added docstring to PLAIN_LITERAL_TYPES.
Added crosslink to graph.serialize

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • If the change adds new features or changes the RDFLib public API:
    • Created an issue to discuss the change and get in-principle agreement.
    • Considered adding an example in ./examples.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

… shown as parameter in serialize. Added docstrings. No functional change.
)

context_data = kwargs.get("context")
use_native_types = (kwargs.get("use_native_types", False),)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to point out that use_native_types was previously a tuple(False,) whereas the new code changes it to a bool.

This alters the runtime behaviour, so it may not be strictly backwards compatible. I'm not sure whether the original tuple was intentional or an oversight.

@WhiteGobo what are your thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants