hyperledger / identus-edge-agent-sdk-swift

https://hyperledger.github.io/identus-edge-agent-sdk-swift/documentation/edgeagentsdk
Apache License 2.0
10 stars 6 forks source link

Can we make DidDoc struct convertible to json? #63

Closed AlexAndrei98 closed 6 months ago

AlexAndrei98 commented 1 year ago

I am currently trying to get back a string that looks like json from the diddoc struct but having a hard time since the struct is not codable. Would it make sense to make a change that way or what is a better way to convert a struct to a string?

AlexAndrei98 commented 1 year ago

I think all it would need to change is line 10 in the DIDDocument Class

- public struct DIDDocument {
+ public struct DIDDocument: Codable {
    public struct VerificationMethod {
        public let id: DIDUrl
goncalo-frade-iohk commented 1 year ago

We can but its not so straightforward, since the DID Document has a few protocols internally of type DIDDocumentCoreProperty.

I will put in the pipeline since it is something useful.

essbante-io commented 6 months ago

This Issue hasn't seen activity in a while. I'm closing it for now, but if this work is still needed, please feel free to reopen it.