Hi,
I was hoping I'd get 'string' for the type... Now that I've thought it over a bit more: there's no need to know the type of a NULL object in order to deserialize. Doh. You don't need an object to create a NULL. <facepalm> I guess I'm just a bit overactive today :)
Thanks anyway for the help, especially on typeof/_typeof/zero_type.
Coen On 14-1-2011 12:35, Martin Bähr wrote:
On Fri, Jan 14, 2011 at 11:39:21AM +0100, Coen Schalkwijk wrote:
I have a mapping containing different kind of objects. In order to succesfully deserialize any object. I need to know the 'original' type of the object to put in the XML so that the receiving/deserializing language knows whether 1 is a string or an int.
as far as i can tell you are getting that information.
mapping(string:mixed) map = ([]);
you are declaring that the type of the value is mixed, and typeof() is telling you exactly that:
typeof(map["test_null"]);
mixed
what other information did you expect here?
greetings, martin.