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

attribute names with encoded information #2887

Open
evbo opened this issue Jan 25, 2025 · 0 comments
Open

attribute names with encoded information #2887

evbo opened this issue Jan 25, 2025 · 0 comments

Comments

@evbo
Copy link

evbo commented Jan 25, 2025

Say I have some field name that encodes additional information:

{
  "gsi1pk": "p",
  "gsi1sk": "s",
}

What's the simplest way to deserialize it into a structure based on string (regex) patterns?:

struct Gsi {
  ordinal: u8,
  partition: String,
  sort: String 
}

So the result would be:

Gsi{ordinal: 1, partition: "p".into(), sort: "s".into() }

If this is too difficult, what about deserializing the fields individually, to at least get something like?:

GsiPk{ordinal: 1, partition: "p".into()}
GsiSk{ordinal: 1, sort: "s".into()}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant