I'm writing some plugins/modules for JQuery and a PERL based CMS (yeah yeah, I know, PHP is simpler, etc, but its a long story, and I'm stuck with it), and I have a bit of a dilemma.
I'm working on an implementation of JSON-RPC v1.1 using JQuery on the client side, and PERL on the server. I have the underlying preliminary code working - calls are being made, and responses generated and handled. I'm going back and doing the data validation and checking to make the system a little more robust. During the development, in the spec it says calls made using a GET can only be strings or arrays (which can be flattened into a string). Using $.ajax, I can see this happening happily. But I can also send it an object, which it translates in [object object]. So the question is, how do I check for the existance of type Object on a variable - and it may not necessarily be at the top level. i.e. Array with an Object in that array somewhere. I just want to check for the existance of this condition quickly, not correct it. Any ideas?