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

support @JsonEnum(valueField "index", indexOffset: 100) #1464

Open
RelicOfTesla opened this issue Dec 17, 2024 · 0 comments
Open

support @JsonEnum(valueField "index", indexOffset: 100) #1464

RelicOfTesla opened this issue Dec 17, 2024 · 0 comments

Comments

@RelicOfTesla
Copy link

RelicOfTesla commented Dec 17, 2024

@JsonEnum(valueField: 'index') // already support 
enum some_status_0 {
  aaa,
  bbb,
}

@JsonEnum(valueField: 'index', indexOffset: 100) 
enum some_status_100 {
  aaa,
  bbb,
}
const _$some_status_0 EnumMap = {
  some_status_0.aaa: 0,
  some_status_0.bbb: 1,
};
const _$some_status_100 EnumMap = {
  some_status_100.aaa: 100,
  some_status_100.bbb: 101,
};
@RelicOfTesla RelicOfTesla changed the title support @JsonEnum(valueField "index+123") support @JsonEnum(valueField "index", indexOffset: 100) Dec 17, 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

No branches or pull requests

1 participant