#Deserialisation of javascript object in command

2 messages · Page 1 of 1 (latest)

vivid glade
#

I am pretty new in tauri. As I understand it is possible to use not only strings in command arguments. I have try to send js object into the one of commands. But I am not sure how better map it automatically using tauri features. Tauri just raise error in ui " invalid type: string "123.0", expected f64" when I am trying to send not only strings.

Should I somehow implement or derive logic for mapping f64 in structure or better to use HashMap<String, serde_json::Value>?

clear nimbus
#

when you don't know the types you're sending from js then ig using serde_json::Value is indeed the way to go (or if you only need a few types without any nesting a custom enum could work too)