Motoko wishlist

Totally forgot

  1. Problem - Cant deserialize to a custom data structure/Type reflection

Ive written a couple serialization libraries for candid, cbor and now xml but all I can seem to do is return a cbor, candid or xml object but people always ask to have auto conversion to their custom types like:

public type MyType = {
  one : Text;
  two : Nat;
};
let value : MyType = deserialize<MyType>(candidCborOrXml);

Probably one of the harder ones but the ability to inspect the type details and do this would be huge

1 Like