- From: Pierre-Antoine Champin via GitHub <sysbot+gh@w3.org>
- Date: Wed, 16 Nov 2022 11:25:54 +0000
- To: public-dxwg-wg@w3.org
> However, in Turtle, this is solvable by simply using the correct datatype One could argue that in JSON-LD, this is *also* solvable by simply using the correct datatype, i.e. a JSON string instead of a number (and leave it to the context to coerce that string into `xsd:decimal` -- see [playground](https://json-ld.org/playground/#startTab=tab-nquads&json-ld=%7B%22%40context%22%3A%7B%22xsd%22%3A%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%22%2C%22decimal%22%3A%7B%22%40id%22%3A%22http%3A%2F%2Flocalhost%2Fdecimal%22%2C%22%40type%22%3A%22xsd%3Adecimal%22%7D%7D%2C%22decimal%22%3A%2212.1%22%7D)). I agree that using a string to express a numeric value is counterintuitive, but IMO so is the subtle distinction that Turtle makes between `1e2` and `100.0` -- I don't know any other language that consider these as different beasts. I also agree that, in an ideal world, JSON-LD would have better support for `xsd:decimal`, but as @gkellogg pointed out [above](https://github.com/w3c/dxwg/issues/1536#issuecomment-1284295230), this is a problem inherited from JSON and the over-simplified view in JavaScript. -- GitHub Notification of comment by pchampin Please view or discuss this issue at https://github.com/w3c/dxwg/issues/1536#issuecomment-1316842143 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 16 November 2022 11:25:56 UTC