8000 Fix #45, blank nodes by Sarke · Pull Request #47 · jkphl/micrometa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix #45, blank nodes #47

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

Merged
merged 2 commits into from
Dec 10, 2019
Merged

Fix #45, blank nodes #47

merged 2 commits into from
Dec 10, 2019

Conversation

Sarke
Copy link
Contributor
@Sarke Sarke commented Nov 28, 2019

Fixes #45

ML\JsonLD uses _: (followed by an identifier) to mark references, and the ones starting with _:b are BlankNodes.

https://github.com/lanthaler/JsonLD/blob/1.1.0/Node.php#L173-L176

https://github.com/lanthaler/JsonLD/blob/1.1.0/Graph.php#L248-L251

@coveralls
Copy link
coveralls commented Nov 28, 2019

Coverage Status

Coverage increased (+0.004%) to 99.565% when pulling 7feb791 on Sarke:jsonld-blank-item into 35c3e43 on jkphl:master.

@rvanlaak
Copy link
Collaborator

Cool, thanks for the links that point out these are blank nodes.

@rvanlaak rvanlaak merged commit f093c49 into jkphl:master Dec 10, 2019
@rvanlaak
Copy link
Collaborator

thank you @Sarke !

@xf-
Copy link
xf- commented Apr 25, 2020

@Sarke & @rvanlaak this results an issue in the current master. I parse an external JsonLD and something will get an Blank node. Afterwards the ItemSeupTrait throws an exception for the empty node being if (!count($nonEmptyTypes)).

        if ($node->isBlankNode()) {
            return ['empty'];
        }

Is my current workaround to avoid the exception.

Googles testtool says the schema is OK - no error.

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.

Author is parsed as _:b1
4 participants
0