Skip to content

wit-parser: change serde format for enum Stability#1598

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
ydnar:ydnar/stability-json
Jun 10, 2024
Merged

wit-parser: change serde format for enum Stability#1598
alexcrichton merged 1 commit intobytecodealliance:mainfrom
ydnar:ydnar/stability-json

Conversation

@ydnar
Copy link
Contributor

@ydnar ydnar commented Jun 9, 2024

This PR makes the JSON representation of enum Stability consistent with other enums in this crate, using the externally tagged representation: https://serde.rs/enum-representations.html#externally-tagged

Originally proposed here: https://bytecodealliance.zulipchat.com/#narrow/stream/327223-wit-bindgen/topic/wit-parser.20crate.3A.20JSON.20format.20changes/near/443516048

Before:

"stability": {
  "type": "unstable",
  "feature": "active"
}

After:

"stability": {
  "unstable": {
    "feature": "active"
  }
}

Now consistent with other enums in this crate, using the externally tagged representation:
https://serde.rs/enum-representations.html#externally-tagged
@alexcrichton alexcrichton added this pull request to the merge queue Jun 10, 2024
Merged via the queue into bytecodealliance:main with commit 1e537ed Jun 10, 2024
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.

2 participants