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

Add support for NULL!? #11

Closed
lanthaler opened this issue Aug 24, 2011 · 2 comments
Closed

Add support for NULL!? #11

lanthaler opened this issue Aug 24, 2011 · 2 comments

Comments

@lanthaler
Copy link
Member

Should we add support for null in JSON-LD? There is a difference between a triple where the object is null to a non-existent triple. I think we should support that, but there are a number of issues:

  • we use null to specify something that has been 'framed' as non-existing.
  • a frame specifying output elements that don't exist is serialized using 'null'. e.g., foaf:homepage: "null"
  • helps programmers to not put in checks to ensure that a key exists, only need to check for 'null' value.
  • kind of strange in RDF too - a property that doesn't exist as null.
  • if JSON-LD treats null as rdf:nil, we may have a round-tripping issue.

Manu Sporny: application specific, empty set can be correct, others would say that database NULL is correct, others would use null in yet another different way.

Alternative would be to define something like jsonld:null or json:null to represent it or a new keyword @null (but most people, including myself, are reluctant to add a keyword for that).

Gregg Kellogg suggests "[]" as no value - RDF does something like that.

@msporny
Copy link
Member

msporny commented Sep 11, 2011

I'm increasingly leaning toward not supporting type coercion for JavaScript's 'null' keyword. There is no use case for it and we already use null to mean something specific in the context of framing.

@lanthaler
Copy link
Member Author

RESOLVED: Leave support for 'null' keyword in JSON-LD as unspecified.

http://json-ld.org/minutes/2011-09-20#topic-1

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

2 participants