-
-
Notifications
You must be signed in to change notification settings - Fork 779
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 adjacently tagged enum but with content name equals to tag #2677
Comments
I would also like to see this feature. This structure is used in glTF, notably by cameras: {
"name": "Finite perspective camera",
"type": "perspective",
"perspective": {
"aspectRatio": 1.5,
"yfov": 0.660593,
"zfar": 100,
"znear": 0.01
}
} |
From your example it seems like the |
Yes, it would work in that case for deserialization, but would be trickier for serialization. |
Found this awesome crate https://github.com/de-vri-es/serde-double-tag |
I have:
I want them to be deserialized into
And also these structs serialized into those.
Motivated by OpenAI API: https://platform.openai.com/docs/api-reference/chat/create functions
Currently we can get around using below
But would be much cleaner and avoid inconsistent data if we have native support.
The text was updated successfully, but these errors were encountered: