neon-bindings/examples

Question: How to detect primitive type?

shi-yan opened this issue · 1 comments

I'm trying to convert a js object into serde_json::Value,

First, I got a list of properties via get_own_property_names() and then I enumerator through all properties to get JsValues.

But I don't know how to convert each JsValue into the corresponding rust type, because how can I check the data type of a JsValue?

This is not mentioned in the document.

Thanks.