Skip to content

Canonicalized json-ld differs on float values #21

@leonfhl

Description

@leonfhl

The validator seems to be rejecting the value 42.0, while accepting values like 42.3 or 42 without issue. Especifically in creditsEarned field

We haven't checked with fields longitude, latitude, creditsAvailable that share a Float type, as we don't use this data in our metadata

EDIT:

Adding more data to this issue, it seems the library we use for normalizing the unsigned credential gives a different format that the one used by the validator:

validator takes 42.0 as "42"^^
<did:lac:ebfeb1f712ebc6f1c276e12ec21> <https://purl.imsglobal.org/spec/vc/ob/vocab.html#creditsEarned> "42"^^<https://www.w3.org/2001/XMLSchema#float> .

pyld normalize 'algorithm': 'URDNA2015' takes 42.0 as "4.2E1"^^
<did:lac:ebfeb1f712ebc6f1c276e12ec21> <https://purl.imsglobal.org/spec/vc/ob/vocab.html#creditsEarned> "4.2E1"^^<https://www.w3.org/2001/XMLSchema#float> .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions