0

y.log with object.toString()

I'm not sure if this is normal for your javascript backend, but the toString() on an object just prints

[object Object]

which makes debugging quite hard. y.log(object) will give nothing useful. Having it print the json form

{"a":"b", "c":"d"}

would be much nicer (like with firebug)

by
3 Replies
  • Use: y.xmlToJson(object)
    0
  • QUOTE (Ivo @ Jun 21 2009, 09:38 AM) <{POST_SNAPBACK}>
    Use: y.xmlToJson(object)


    that will only work if object is an XML object.

    * "Exception: xmlObject is not an XML object in JavaScript."
    0
  • QUOTE (Paul Tarjan @ Jun 21 2009, 04:27 AM) <{POST_SNAPBACK}>
    I'm not sure if this is normal for your javascript backend, but the toString() on an object just prints

    [object Object]

    which makes debugging quite hard. y.log(object) will give nothing useful. Having it print the json form

    {"a":"b", "c":"d"}

    would be much nicer (like with firebug)



    Indeed an issue. Although there is a workaround, by default we should try and do better here. I've filed a bug for this which will be fixed in the upcoming releases.

    thanks,
    Nagesh
    0

Recent Posts

in YQL