For simplicity, async functions and tasks perform serde on the main thread. However, it would perform better to perform this blocking operation on another thread.
Maybe JsonString? It would act exactly like Json, but stop at the intermediary string. It will need some special handling for Err on serde_json::to_string. Maybe a TryFrom implementation and a neon::types::extract::Error.
For simplicity, async functions and tasks perform serde on the main thread. However, it would perform better to perform this blocking operation on another thread.
Maybe
JsonString
? It would act exactly likeJson
, but stop at the intermediary string. It will need some special handling forErr
onserde_json::to_string
. Maybe aTryFrom
implementation and aneon::types::extract::Error
.