billyquith / ponder

C++ reflection library with Lua binding, and JSON and XML serialisation.
http://billyquith.github.io/ponder/
Other
645 stars 95 forks source link

How to find the type of a property #81

Closed shierei closed 7 years ago

shierei commented 7 years ago

Is there a way to find the type of a property value? I am trying to convert any UserObject's properties into a JSON document. To do that I need to find the type of a property value returned form get() to see if it is a number, string or boolean.

shierei commented 7 years ago

I found that there is a kind() member function in ponder::Property for this.

billyquith commented 7 years ago

Yes: docs