RE: Values with angle brackets

You are right Stéphane, it was misinterpreted as a HTML tag (and thus
hidden) because it wasn’t escaped properly.

I just pushed an update. It should be fixed now.

 

Thanks for bringing this up again, last time I just fixed it in my
playground [1] and forgot to do the same for the official one.

 

 

[1] http://www.markus-lanthaler.com/jsonld/playground/

 

 

--

Markus Lanthaler

@markuslanthaler

 

 

 

From: Stéphane Corlosquet [mailto:scorlosquet@gmail.com] 
Sent: Friday, August 17, 2012 5:45 PM
To: nil
Cc: public-linked-json
Subject: Re: Values with angle brackets

 

 

On Fri, Jul 20, 2012 at 4:15 AM, nil <nil.niklas@gmail.com> wrote:

Hi,

I'm wondering why the playground omits values between < and > in the output.
My example input:
{
  "@context": {
    "message-id": "http://www.semanticdesktop.org/ontologies/nmo#messageId"
  },
  "message-id":
"<CAERg+cg3y+bKtk9KE5UMmK15+1+U191oUgVZaT=ifhB7YqaMAQ@mail.gmail.com>"
}

The output (in Compacted form):

{
  "http://www.semanticdesktop.org/ontologies/nmo#messageId": ""
}

If I put text before / after the brackets, it becomes part of the
output. Do I need to escape the brackets? If so, why is that and where
is it documented?

 

I can still reproduce this in the playground. It might be that the angle
bracket needs to be escaped? using &lt; works. Not sure if the behavior
above is a bug in JSON-LD or in the playground. Seems like the round
tripping isn't working: the normalized output has the expected value, but
the compacted and expanded outputs don't. Can someone confirm what's going
on?

 

Steph.

Received on Friday, 17 August 2012 16:25:45 UTC