On 12/01/17 17:24, Grahame Grieve wrote:
hi Andy
Also, in JSON, a bare number is a long or double, not decimal, so try
putting in the lexical form in a string:
"Quantity.value": {
"decimal": 123.45
"decimal": "123.45"
http://json-ld.org/spec/latest/json-ld/#dfn-number
[[
a number is equivalent to either a long or double, depending on if the
number has a non-zero fractional part
]]
Well, that's interesting. Ill discuss that with the json-ld team.
Irrespective of that, since the library actually handles the conversion
either way, why should it
output an error?
The library that Jena uses is jsonld-java (it's on github) - they would
be able to be answer that.
My reading of the JSON-LD spec is that this applies:
[[
A typed value consists of a value, which is a string, and a type, which
is an IRI.
]]
although the (non-normative) text in
https://www.w3.org/TR/json-ld/#typed-values
does not indicate what happens when points 1 and 3 apply.
The JSON-LD playground thinks that first you apply the rules for number
123.45 to get a string then apply the @type.
Andy
Grahame