Re: Intent to close ISSUE-204

On 01/14/2013 11:42 AM, Markus Lanthaler wrote:
> On Monday, January 14, 2013 5:34 PM, Manu Sporny wrote:
> 
>> Don't close it yet. We found an issue when implementing this that 
>> affects any system storing JSON-LD in compact form. I'd like to
>> discuss a best practice when dealing with this issue...
>> document-relative URLs are a problem for the Web Payments work.
> 
> OK. Could you elaborate a bit? Passing null (or '') as the base IRI
> in JsonLdOptions doesn't address the problem?

The problem in a nutshell is that we store JSON-LD data in compact form
(to save space in the database). Thus, if the library was used in its
default configuration, and a base URL was passed to the library, then
all @id paths would become relative before storing the document.

If a developer fails to store the base URL, or set the base URL to null,
then they lose the URL forever. My concern is that others may start
doing this as well and not know about the nuance. I'm concerned about
this being the default behavior.

There is an argument that surely people will catch this before a system
goes into production, but I think it's the aggressive optimization that
I find concerning. I'd rather there is a flag that says "optimize @id
URLs", than just do it by default... because when you do it, you lose
information and the only way to get that information back is to make
sure your application remembers the lost information.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: HTML5 and RDFa 1.1
http://manu.sporny.org/2012/html5-and-rdfa/

Received on Monday, 14 January 2013 17:40:10 UTC