Re: JSON-LD Playground

Manu, this is great!

A couple of points:

1) The Turtle output could be a bit better, I think the only reason to show Turtle is that it makes the graph easier to understand. This is the output from my Turtle writer:

@base <> .
@prefix : <http://rdf.data-vocabulary.org/#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


 [ :ingredients "1 cup ice cubes",
    "1 tablespoons white sugar",
    "1/2 cup club soda",
    "1/2 lime, juiced with pulp",
    "12 fresh mint leaves",
    "2 fluid ounces white rum";
    :instructions [ :description "Pour white rum over ice.";
      :step "3"^^xsd:integer],
    [ :description "Garnish with a lime wedge.";
      :step "5"^^xsd:integer],
    [ :description "Fill the rest of glass with club soda, stir.";
      :step "4"^^xsd:integer],
    [ :description "Fill glass to top with ice cubes.";
      :step "2"^^xsd:integer],
    [ :description "Crush lime juice, mint and sugar together in glass.";
      :step "1"^^xsd:integer];
    :name "Mojito";
    :yield "1 cocktail"] .

(It could be even better if, e.g., "1"<xsd:integer> were just replaced with a bare '1').

2) Is there a framing spec for JSON-LD? I like the concept of using the structure from a template document to control chaining/framing output.

Gregg

On Jul 9, 2011, at 2:24 PM, Manu Sporny wrote:

Hey folks,

There is now a live, Web-based JSON-LD processor available here:

http://json-ld.org/playground/

It uses the latest experimental JavaScript JSON-LD processor (Forge's
JSON-LD processor) written by Dave Longley. The processor includes some
of the latest changes we've been discussing on the mailing list. "@" is
now "@subject". "a" is now "@type".

It also implements the latest normalization algorithm that Dave's been
working on, which he will explain in a separate e-mail. The new
normalization algorithm works with all of the known, really nasty graph
isomorphism inputs that the old algorithm didn't handle. At present, we
do not know of a single case that the algorithm cannot handle.

The website also got a bit of a facelift. Not much of one since I'm no
graphic designer and my CSS skills are fairly lame.

The biggest addition is the Playground code, which allows you to:

1. Type out arbitrary JSON-LD and view it in compact form,
  expanded form, normalized form, framed form and as TURTLE.
2. Specify a JSON-LD frame to re-frame an arbitrary set of triples
  into a JSON data structure.
3. Select a set of pre-made JSON-LD examples and view the output.
4. Immediate feedback on the output of the JSON-LD processor.
5. Syntax highlighting for JSON-LD and TURTLE, making it easier to
  spot and debug errors.
6. Very minimal error handling - need to integrate a JSON linter at
  some point.

Give it a shot and let us know what you think of it. All code for the
site and the playground is available here:

https://github.com/json-ld/json-ld.org

-- manu

--
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarm Developer Tools and Demo Released
http://digitalbazaar.com/2011/05/05/payswarm-sandbox/

Received on Sunday, 10 July 2011 17:56:09 UTC