Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(refactor) small refactor to the new DIDExchange AnyXYZ wrappers #1249

Conversation

gmulhearn
Copy link
Contributor

I started these changes mostly wanting to remove Deserialize trait from the AnyXYZ wrappers. As IMO trying to deserialize JSON back into AnyXYZ is dangerous; if both V1_0 & V1_1 variants are the same, then the serialized format is the same, so when deserializing serde cannot tell which variant it is, so it just picks the first one (misleading).

Also whilst i was here... i realised the Any wrappers were duplicating themselves alot, so i made a generic enum for it

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>
Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>
Copy link
Contributor

@JamesKEbert JamesKEbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is great--I also applaud the code de-duplication you did here

@JamesKEbert JamesKEbert merged commit c9b6597 into hyperledger:main Jul 3, 2024
22 checks passed
lukewli-anonyome pushed a commit to lukewli-anonyome/aries-vcx that referenced this pull request Jul 25, 2024
…erledger#1249)

* remove deserialize from any wrappers

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

* simply any wrappers

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>

---------

Signed-off-by: George Mulhearn <gmulhearn@anonyome.com>
Co-authored-by: George Mulhearn <gmulhearn@anonyome.com>
Signed-off-by: lli <lli@anonyome.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants