Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] [EXT] : Re: JSON-LD option to ignore datatypes from context ?
  • From: "Bart Hanssens (BOSA)" <bart.hanssens@xxxxxxxxxxxx>
  • Date: Fri, 9 May 2025 19:59:28 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bosa.fgov.be; dmarc=pass action=none header.from=bosa.fgov.be; dkim=pass header.d=bosa.fgov.be; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C/eMHESUX5ceBkvkr91twpHWp196QKomNVLA+R4IobE=; b=LvUCaveQ5VQyyVtSFLejWVmnK11wpA83kU2NC/zkrCA+vT3a7tx9j/nmXeJ8t+Csr9AwMmFqgeVFHug4kxQ543iUrUDKexlD11Ru4j0zxwwz6YeNB/qFeiigMRGsQ0a/iuoeqTmijHqsLHUrCIOthSAcLl19y3j8/YNioklE0FmE8Q+lzqkm9dnYN3XvPa97aQUKs9Mpny8O7vkQWpgmF9PvoKOTZFcAocRlBHJMD8ZWqd4hLO+XBiCUnguoUCixb0KTwdCAafbJJxFYS10actqy1DdA37ecjc7jH4+ApQelb/IDJg7cuv79y9k2qRdx18s1lmqLMi1+AzOzeSor7Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W1rVlO0Lv13mxVtu+Ywh2V9GsNw6eFfX9vBQZsDQW0HIFN4liReogUuPuebO/0n5hb3UC8Lx8GONjzmuddnS+c75mPMh2DlaA0Qz17aaAtYHED+x0fBe/ayQJYGM5PPtNjvJteU6YHCn08LdC77/HCnDDjc40cLxJLRli/zupBpb3iC+E0feUQNtY3eou42d6d+nSmL/u7dfdapWP5sn/UweYblmGPmcjt0QRWSaKRfHM++FQPbtZGiGfajolFShCpQxHGljR3tiOmQCaBSDj8U9G7jhQcnU4UE0S8SveUT32C5jwuGUfvqeCoJhhIUz/4Uxt3fNl1nRamoTvfPwSg==
  • Delivered-to: rdf4j-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/rdf4j-dev/>
  • List-help: <mailto:rdf4j-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/rdf4j-dev>, <mailto:rdf4j-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/rdf4j-dev>, <mailto:rdf4j-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: Adu//hFg5wm8hnv8TzeBVMge5GNzqgAFeNUAAEIpBXA=
  • Thread-topic: [EXT] : Re: [rdf4j-dev] JSON-LD option to ignore datatypes from context ?

Hello Håvard,

 

Thanks, it is indeed the intended behavior according to the JSON-LD spec.

Looks like there are some issues with the CSVW Test Suite…

 

Best regards

 

Bart

 

From: Håvard Ottestad <hmottestad@xxxxxxxxx>
Sent: donderdag 8 mei 2025 14:23
To: rdf4j developer discussions <rdf4j-dev@xxxxxxxxxxx>
Cc: Bart Hanssens (BOSA) <bart.hanssens@xxxxxxxxxxxx>
Subject: [EXT] : Re: [rdf4j-dev] JSON-LD option to ignore datatypes from context ?

 

Hi Bart,

 

The fact that the context can provide a datatype for the JSON-LD file is intended, as far as I know.

 

 

There is also a toggle for making parser warnings throw exceptions, since the standard says to just ignore anything that is incorrect. https://github.com/eclipse-rdf4j/rdf4j/blob/b33d91485502d2f5266916c0581960e41b8f28b5/core/rio/jsonld/src/main/java/org/eclipse/rdf4j/rio/jsonld/JSONLDSettings.java#L72 

 

Håvard

 



On 8 May 2025, at 11:46, Bart Hanssens (BOSA) via rdf4j-dev <rdf4j-dev@xxxxxxxxxxx> wrote:

 

Hi,

 

as I’m working on a CSVW parser, which uses JSON-LD metadata (default values, URI templates…) to convert CSV to RDF,
it seems that the new JSON-LD parser is pretty smart in converting slightly incorrect JSON values, when a context declares the datatype.

E.g.  string value “5” becomes integer 5 when the context says the datatype is xsd:integer

 

Now, the W3C CSVW spec (and conformance test suite) has some rules on what to do when the JSON-LD metadata contains invalid values.

So my question is, is there an option on the JSON-LD parser to not correct the datatypes based on context, or to remove incorrect values altogether ?

Or should I e.g. create a custom DocumentLoader ?

 

Thanks

 

Best regards

 

Bart

_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/rdf4j-dev

 


Back to the top