Closed TimoGlastra closed 9 months ago
FYI @2mau not sure if you're running into issues with this?
@TimoGlastra were you able to reproduce it in rust? I updated demo test to print credential as JSON and see that number values are represented as expected.
were you able to reproduce it in rust?
No I only did it in the JS wrapper, I'm not really experienced with Rust 🙈
But it seems to be if you call toJson
before calling credential.process
So in FFI calls it'd be:
When I create a W3c credential using AnonCreds RS and directly transform it into JSON, I get back the
credentialSubject
with string values for numbers (so"height": "175"
).However if i now convert the credential to legacy and back to w3c format if I now encode it to json again it will set number values as numbers (so
"height": 175
).305 addressed supporting numbers, but I thin there may be a bug in the initial credential creation where values are not set as number
@Artemkaaas any idea where this should be fixed?
I can now work around it by doing create_w3c -> to_legacy -> to_w3c but that's a bit of overhead of course