Replies: 3 comments 1 reply
-
I think this would work out fine when working with, say, serde, because it would generate errors if it doesn't get the general structure that it expects to be deserializing? Much like serde_json supports weird stuff like "string OR object" in values? |
Beta Was this translation helpful? Give feedback.
-
Depending on the language, maybe/perhaps. In Rust, where arrays must be homogenous, one could:
|
Beta Was this translation helpful? Give feedback.
-
In general, the answer to both "what's the real world use-case" and "what do you do in certain languages" is "the exact same as for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wonder what is the possible real-world use of mixed value types like:
I'm not sure yet but wouldn't it be a pain to deserialize this in languages where an array of values can only have one type?
Beta Was this translation helpful? Give feedback.
All reactions