The following feature request is written from a rust perspective but might also be valid for other languages.
Currently the following struct in rust, which is being used as a newtype, is being exposed as an object instead of the simplified encoding of simply the wrapped typed.
#[derive(Shrinkwrap, Schema, Debug, Clone, Copy)]
pub struct LobbyId(pub Uuid);
When this struct is being used as input or output of agents it results in the following json:
...
"id": {
"value": "dd00721b-3329-4621-a01d-c71f02cd78c6"
}
...
Instead the following encoding which should have all information to read and write the newtype is easier to read and also provide as input:
...
"id": "dd00721b-3329-4621-a01d-c71f02cd78c6"
...
It would be nice to have an option, so that wrapper structs simply wrapping one value (or annotated with a derive macro) would be serialized as described above.
The following feature request is written from a rust perspective but might also be valid for other languages.
Currently the following
structin rust, which is being used as a newtype, is being exposed as an object instead of the simplified encoding of simply the wrapped typed.When this struct is being used as input or output of agents it results in the following json:
Instead the following encoding which should have all information to read and write the newtype is easier to read and also provide as input:
It would be nice to have an option, so that wrapper structs simply wrapping one value (or annotated with a derive macro) would be serialized as described above.