pmed / v8pp

Bind C++ functions and classes into V8 JavaScript engine
http://pmed.github.io/v8pp/
Other
890 stars 120 forks source link

Added possibility to add generic "toJSON" function to class #96

Closed atvise closed 5 years ago

atvise commented 5 years ago
atvise commented 5 years ago

This adress following issue -> #88

pmed commented 5 years ago

Hi @atvise

I've merged it with some changes: extracted class_::set_json() as a free function v8pp::json_object(), in order to use its result as a generic default implementation for toJSON(). For details please see the commits referenced above.

Thank you for the project impovements!