Re: The rdf:JSONLiteral datatype

On Thu, May 17, 2012 at 11:56 AM, Richard Cyganiak <richard@cyganiak.de> wrote:
> Hi Dominik,
>
> On 17 May 2012, at 19:46, Dominik Tomaszuk wrote:
>>>  • What is the use case for this datatype?
>> Repository of access control, where we store ACLs in JSON for RDF data.
>
> Wouldn't it be better to define a my:JSON_ACL datatype for your specific JSON format?
>
>>>  • Are there examples of systems that currently use JSON literals in RDF literals?
>> Mine :-) . It is only prototype, I don't publish it yet. It's part of my Ph.D. thesis.
>>
>>>  • Are there examples of currently published RDF data that use such JSON literals?
>> For example ACLs.
>
> Well, that's a start, but the existence of a single prototype system that might benefit from this feature doesn't create a very strong case for including it yet.
>
>>>  • Why isn't xsd:string sufficient for representing JSON literals?
>> Well, it is close to approach XMLLiteral. Most of the cases for the XML xsd:string is sufficient, but it is in spec.
>
> The motivating use case for rdf:XMLLiteral and rdf:HTML is including text markup in literals. In these cases, xsd:string is not sufficient because display engines need to know whether the string is to be interpreted literally or as marked up text.

Specifically from the definition of xsd:string it says not to use it
for mark-up:

Note:  Many human languages have writing systems that require child
elements for control of aspects such as bidirectional formating or
ruby annotation (see [Ruby] and Section 8.2.4 Overriding the
bidirectional algorithm: the BDO element of [HTML 4.01]). Thus,
string, as a simple type that can contain only characters but not
child elements, is often not suitable for representing text. In such
situations, a complex type that allows mixed content should be
considered. For more information, see Section 5.5 Any Element, Any
Attribute of [XML Schema Language: Part 0 Primer].

The main use care requiring XMLLiteral and HTMLLiteral is not to
include data but to include language, there are language constructs
that can not be expressed in a simple string. JSON is neat, but is not
a way for representing text. It's easy enough to define a datatype
outside of the RDF specification.

>
>>>  • Given that anyone can define new RDF datatypes, why should RDF-WG do it?
>> Because JSON like XML and HTML is universal and common. There are a lot of solutions based on the JSON, which can be mixed with RDF in future.
>
> Well, CSS and Javascript and CSV and lots of other formats are universal and common, and have lots of solutions based on them. But this doesn't mean that RDF-WG should define datatypes for them.
>
> Best,
> Richard
>
>
>>>  • Why is this within the scope of RDF-WG's charter [1]?
>> It can be connected to JSON serialization, which is in the scope of RDF-WG's charter.
>>
>>
>> Cheers,
>> Dominik
>>
>
>

Received on Thursday, 17 May 2012 21:28:46 UTC