W3C home > Mailing lists > Public > public-linked-json@w3.org > May 2011

Re: JSON-LD normalization algorithm and MongoDB

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Mon, 09 May 2011 21:21:02 -0400
Message-ID: <4DC892FE.6050603@digitalbazaar.com>
To: public-linked-json@w3.org
On 05/08/2011 08:14 PM, Bradley Allen wrote:
> Given that the revised specification requests input from people who
> are using MongoDB and JSON-LD, I thought I'd throw this out there.

I have very little real-world experience with MongoDB, so your input is
really appreciated!

> Step 2.1 in the Normalization Algorithm in section 8.3.3 states that
> for each key in the input JSON-LD document is a CURIE, "If the key is
> a CURIE, expand the CURIE to an IRI using the transformation map."
> Presumably, most IRIs will contain periods, i.e. the '.' character.
> Per http://www.mongodb.org/display/DOCS/Legal+Key+Names, in MongoDB,
> "the '.' character must not appear anywhere in a key name" in a given
> document.


This is also an issue if someone decides to use the '.' character in a
vocabulary. I wonder if DBPedia has '.' characters in the vocab terms it

> Therefore, it is likely that most if not all of the output of the
> Normalization Algorithm as stated in the specification will be not be
> storable in MongoDB without further editing or modification. That may
> be OK in many use cases; simply storing JSON-LD with all keys being
> CURIEs will avoid this issue, but it is worth noting that restriction.

We don't expect that many people will store JSON-LD in normalized form.
Normalized form is usually used for calculating graph equivalence,
diff-ing and generating digital signatures.

I've added an issue marker in the latest spec to note this point.
Perhaps we need to give even more guidance to folks using JSON-LD in
MongoDB in a Best Practices section.

-- manu

Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarm Developer Tools and Demo Released
Received on Tuesday, 10 May 2011 01:21:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:53:17 UTC