You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now all our custom type examples are structs. It could be good to add some Enum examples -- e.g. a JSONObject as a JSONEnum which translates to a serde_json::Value.
There are two issues with serde_json::Value though:
I vaguely think JSON isn't a great example here, as I don't think a custom enum would make sense in practice - ie, it might mislead people into thinking that exposing JSON via a custom enum is the "correct" approach to a custom JSON type.
Maybe an Any enum?
[Enum]
interface Any {
I32(i32),
String(string),
It doesn't have to be thorough, just enough to demonstrate the idea?
Right now all our custom type examples are structs. It could be good to add some
Enum
examples -- e.g. a JSONObject as a JSONEnum which translates to a serde_json::Value.There are two issues with
serde_json::Value
though:So we should either resolve those issues, or think of a different Enum example.
┆Issue is synchronized with this Jira Task
┆friendlyId: UNIFFI-125
The text was updated successfully, but these errors were encountered: