Re: XSD datatypes in JSON-LD (was: Re: Use of XSD namespace in RDF recommendations)

Markus,

Thanks for the explanations. All sounds good to me except...

On 5 Sep 2012, at 10:38, Markus Lanthaler wrote:
>> Why would one want to set useNativeTypes to false?
> 
> E.g. to not lose the information that 5 was intended to be a double when
> converting "5"^^xsd:double to JSON-LD. Otherwise "5" would be converted to a
> native JSON number and in the next toRDF() call it would become
> "5"^^xsd:integer as there's no fraction.

Why not convert "5"^^xsd:double to a JSON-native 5.0? This would allow round-tripping, and no useNativeTypes flag is necessary.

Best,
Richard

Received on Wednesday, 5 September 2012 09:51:03 UTC