-
Notifications
You must be signed in to change notification settings - Fork 675
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
Add serde interfaces #5893
Add serde interfaces #5893
Conversation
Update:
Note: I have restricted the encoder interface because for CIDs we do not need a generic input type. Also when loading the object from the |
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Just update the |
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Went ahead with the suggestion for a generic serde. Main changes:
|
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
modules/nf-commons/src/main/nextflow/serde/gson/RuntimeTypeAdapterFactory.java
Show resolved
Hide resolved
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works as expected. I have just renamed the test class JsonEncoderTest to CidEncoderTest to match with the refactor. Ready to merge to cid-store from my side. Once merged, I will update the annotations PR
Draft implementation for a generic ser-deserialization mechanism for CID model.
Inspired to https://github.com/seqeralabs/wave/blob/77bbb416e8ff2101a8ede397049c5022d1f1d1b1/src/main/groovy/io/seqera/wave/encoder/MoshiEncodeStrategy.groovy#L46-L46