I have a custom object/class that has private data and I am trying to
add logic to convert it to a string type or you might also call it
serialization to string. Looks like the suggested way is to use
JSGetObjectOps and use the defaultValue to convert to the appropriate
type. However the documentation suggests that this is a internal
feature.
Am I making this more difficult that it is? Is there an easier way to
do this? I already implemented the convert function (JS_ConvertStub)
but looks like that is not being called by object.toString() or when I
do a JSON.stringify.
Thanks,
Bhushan