Skip to content
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

No expansion of JSON field with name "0" #102

Open
frmichel opened this issue Jun 25, 2020 · 1 comment
Open

No expansion of JSON field with name "0" #102

frmichel opened this issue Jun 25, 2020 · 1 comment

Comments

@frmichel
Copy link
Contributor

frmichel commented Jun 25, 2020

Hi Markus,

Just found a very curious behaviour. I'm using JsonLD:toRDF to expand a JSON-LD file, but any field "0" seems to be ignored.

Document:

{ 
  "@context": { "@vocab": "http://example.org/vocab#" },

   "0": { "field0": "value0" },
   "1": { "field1": "value1" }
}

Result:

_:b0 <http://example.org/vocab#1> _:b1 .
_:b1 <http://example.org/vocab#field1> "value1" .

Same thing if another field anywhere in the document is named "0", it is always sort of ignored. Have you seen that already? Any idea?

Context:

  • php 5.6.40
  • I tested it with JsonLD v1.1 and v1.2. Same issue.

Thx,
Franck.

@dereuromark
Copy link

Sounds like empty() usage somewhere where a more strict check would be good.

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

No branches or pull requests

2 participants