toJSONString and other introspections

Kris Zyp kriszyp at
Mon Jun 25 09:06:03 PDT 2007

I was wondering how toJSONString should handle objects with members of
multiple namespaces?
For example:
namespace N1
obj = {};
obj.toJSONString() -> ?
Would toJSONString simply not be able to serialize in such a way that the
object can deserialized? The reference implementation does not seem to have
toJSONString implemented yet. Doing an enumeration of obj returns gives an
"a" and an empty string for keys, I assume that is not correct and that
would not be the field names used by toJSONString.
Also, Is there specific way that toJSONString should behave when called for
class? Will it just perform a normal enumeration (i.e. not override the
default toJSONString)?
Also, is there a way to determine what the class object is for a given
object? In the reference implementation, the toString() will tell you name
of the class, but is there a way to access to the class object (like
getClass() in Java) from an instance object? Also, should there be any
introspection available on a
class object (beside the static members), such as the determining member
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Es4-discuss mailing list