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

Type Coercion is confusing #34

Closed
lanthaler opened this issue Sep 28, 2011 · 3 comments
Closed

Type Coercion is confusing #34

lanthaler opened this issue Sep 28, 2011 · 3 comments

Comments

@lanthaler
Copy link
Member

I would like to discuss the type coercion feature which I find a bit confusing.

The reason is that it works the other way round as it is normally expected by developers/programmers. An exemplary type coercion definition looks as follows:

"@coerce":
{
  "xsd:integer": "age",
  "@iri": "homepage"
}

Which says that age is an integer and homepage is an IRI. I expect that an average developer would try to specify it exactly the other way round:

"@coerce":
{
  "age": "xsd:integer",
  "homepage": "@iri"
}

What was the rationale of doing it the other way round? Isn't it even in the processing algorithms more handy if it is stored in the second form?

@msporny
Copy link
Member

msporny commented Oct 16, 2011

This was discussed on the mailing list:

http://lists.w3.org/Archives/Public/public-linked-json/2011Oct/0004.html

@lanthaler
Copy link
Member Author

It has been decided to change to spec as suggested above (http://json-ld.org/minutes/2011-10-18/). The spec hasn't been updated yet.

gkellogg added a commit that referenced this issue Dec 15, 2011
…an expanded term definition using @datatype and @list.

Define an expanded version of the term definition. This resolves issues #34, #40 and #41.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants