Skip to content

fixes import on a typical schema-org.json #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: issue-231
Choose a base branch
from

Conversation

pvgenuchten
Copy link
Contributor

@pvgenuchten pvgenuchten commented Mar 28, 2025

this adds methods get_first and get_all to get elm or get list
and fixes some parse errors

schema.org has a 0-N cardinality for most of its properties, if the value is single, the actual value is returned, if it is multiple a list of elements is returned

These utility functions provide option to grab the first or all elements, while checking their type to be literal or list, get-all returns list, get-first returns literal

some samples:

either fetch the json-ld from the html or open it in https://validator.schema.org/

@pvgenuchten pvgenuchten force-pushed the improve-schema-org branch from b6ab6a0 to 4e02046 Compare May 23, 2025 09:14
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.

1 participant