8000 Decode Node as Mapping · Issue #242 · jpsim/Yams · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Decode Node as Mapping #242
Closed
Closed
@acecilia

Description

@acecilia

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0