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

Adds the ability to access a Node's tag during decoding #352

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ssgutierrez42
Copy link

Summary

Enables access of a Node's tag:
e.g. !DanceEvent

structure:
  version: 0.1.0
  actions:
    8a139ac7: !DanceEvent
      type: happy

During the decoding function of Codable objects:

 required init(from decoder: Decoder) throws {
      ...
      print("\(decoder.tag)") //!DanceEvent
      ...

Background

See #265

Enables an avenue to decode polymorphic types.

@ssgutierrez42 ssgutierrez42 marked this pull request as ready for review April 11, 2022 18:29
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.

1 participant