whoops I lost a couple of commas. This works:

{
  "@type": "fhir:Claim",
  "@id": "http://hl7.org/fhir/Claim/760152";,
  "Quantity.value": {
     "decimal": "123.45"
  },
  "@context": {
    "fhir": "http://hl7.org/fhir/";,
    "xsd": "http://www.w3.org/2001/XMLSchema#";,
    "decimal": {
      "@id": "fhir:value",
      "@type": "xsd:decimal"
    },
    "Quantity.value": {
      "@id": "http://hl7.org/fhir/Quantity.value";
    }
  }
}

On Thu, Jan 12, 2017 at 2:35 PM, Conal Tuohy <conal.tu...@gmail.com> wrote:

> On 12 January 2017 at 12:34, Grahame Grieve <
> grah...@healthintersections.com.au> wrote:
>
> > Consider this JSON-LD:
> > {
> >   "@type": "fhir:Claim",
> >   "@id": "http://hl7.org/fhir/Claim/760152";,
> >   "Quantity.value": {
> >      "decimal": 123.45
> >   }
> >   "@context": {
> >     "fhir": "http://hl7.org/fhir/";,
> >     "xsd": "http://www.w3.org/2001/XMLSchema#";,
> >     "decimal": {
> >       "@id": "fhir:value",
> >       "@type": "xsd:decimal"
> >     }
> >     "Quantity.value": {
> >       "@id": "http://hl7.org/fhir/Quantity.value";
> >     }
> >   }
> > }
> >
> > This is valid,
>
>
> No, it's not valid. Paste it into http://json-ld.org/playground/ and see
>
>
> > but Jena logs an error: WARNING: Lexical form '1.2345E2' not
> > valid for datatype http://www.w3.org/2001/XMLSchema#decimal
> >
> > I think this is a bug in Jena - or JsonLD-java?
> >
>
> Maybe there is a bug there, maybe not, but you need to get your JSON-LD
> correct first.
>



-- 
-----
http://www.healthintersections.com.au / grah...@healthintersections.com.au
/ +61 411 867 065

Reply via email to