Skip to content

Always try to add a default @type and @language - #60

Closed
rknLA wants to merge 1 commit into
digitalbazaar:masterfrom
Artory:master
Closed

Always try to add a default @type and @language#60
rknLA wants to merge 1 commit into
digitalbazaar:masterfrom
Artory:master

Conversation

@rknLA

@rknLA rknLA commented Jul 18, 2017

Copy link
Copy Markdown

Fixes #59

In cases where @type was set, but not @language, one or the other would end up being an empty dictionary.

I have not run any tests on this, or added test cases, so that might need to be addressed before merging.

In cases where @type was set, but not @language, one or the other would
end up being an empty dictionary
Comment thread lib/pyld/jsonld.py
entry['@language'].setdefault('@none', term)
# add entries for no type and no language
entry['@type'].setdefault('@none', term)
entry['@language'].setdefault('@none', term)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't know but I am concerned about verbosity of the resulting document. What do you think about this?

@mielvds

mielvds commented Dec 24, 2025

Copy link
Copy Markdown
Collaborator

Closing this as it introduces makes spec tests fail

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.

Dates from schema.org are not compacted correctly.

3 participants