> On Nov 30, 2018, at 10:24 AM, Andy Seaborne <[email protected]> wrote:
> On 29/11/2018 15:48, ajs6f wrote:
>> I'm not Martynas, so you didn't misname anyone that I saw.
>> JSON-LD can certainly help with this: any time you have JSON, and you wish 
>> it were RDF, JSON-LD is there for you!
> 
> This is JSON-LD's strong point.
> 
> It is weaker for RDF->JSON, or rather you have to work at it.
> 
> Getting nice looking JSON out of RDF via JSON-LD is harder than the mere 
> pretty printing we have for Turtle and RDF/XML.  It's closer to wanting the 
> output as speific XML schema (something that has come up several times on 
> StackOverflow in the past 2 weeks). The hard part is "nice looking JSON" has 
> a strong component of being in the eye of the beholder once it's past a flat 
> JSON object.
> 
> The JSON-LD ecosystem has stuff to help with this but no longer a matter of a 
> simple "model.write".

This is true, partly because JSON is inherently tree-ish and some means must be 
used to get the arbitrarily-shaped RDF graph into that shape. For that reason 
the stuff to which Andy refers includes JSON-LD Framing [1] which allows you to 
control the shape of the JSON and supply default values for properties in the 
JSON that may or may not be filled in by RDF triples for any given instance.

ajs6f

[1] https://w3c.github.io/json-ld-framing/

Reply via email to