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

Decode Node as Mapping #242

Open
acecilia opened this issue Mar 10, 2020 · 0 comments
Open

Decode Node as Mapping #242

acecilia opened this issue Mar 10, 2020 · 0 comments

Comments

@acecilia
Copy link
Contributor

Hi:

I can not find a way to easily decode the following yaml:

firstParty:
- SwiftModule1
  dependencies: [SwiftModule2]
- SwiftModule2
  dependencies: [SwiftModule3]

To the following Struct:

struct Module: Codable {
    let name: String
    let dependencies: [String]
}

How can I indicate Yams that the first value without key corresponds to the name property of the struct?

Thanks!

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

No branches or pull requests

1 participant