0

Can't find method jsonToXml

Ok, one more...

With code

CODE
var xml = y.jsonToXml(games);


I get

CODE
        <javascript><![CDATA[Exception: Can't find method jsonToXml(object). (<javascript>#10)]]></javascript>


But the docs say it exists (i think) :

http://developer.yahoo.com/yql/guide/yql-j...pt-objects.html

by
5 Replies
  • QUOTE (Paul Tarjan @ Jun 23 2009, 10:44 PM) <{POST_SNAPBACK}>
    Ok, one more...

    With code

    CODE
    var xml = y.jsonToXml(games);


    I get

    CODE
            <javascript><![CDATA[Exception: Can't find method jsonToXml(object). (<javascript>#10)]]></javascript>


    But the docs say it exists (i think) :

    http://developer.yahoo.com/yql/guide/yql-j...pt-objects.html


    Hey Paul,

    Whats the object "games" here. i.e how did you get this object. Can you post the code which created this var?

    -- Nagesh
    0
  • QUOTE (Nagesh Susarla @ Jun 24 2009, 10:08 AM) <{POST_SNAPBACK}>
    Hey Paul,

    Whats the object "games" here. i.e how did you get this object. Can you post the code which created this var?

    -- Nagesh


    CODE
    var games = y.query('SELECT * FROM html WHERE url="http://paulisageek.com/tmp/xbox?url=' + url + '"');


    so it was a response object. Which I thought was an "object" but maybe not?
    0
  • QUOTE (Paul Tarjan @ Jun 24 2009, 10:41 AM) <{POST_SNAPBACK}>
    CODE
    var games = y.query('SELECT * FROM html WHERE url="http://paulisageek.com/tmp/xbox?url=' + url + '"');


    so it was a response object. Which I thought was an "object" but maybe not?


    Hey Paul,

    The response is already encoded in XML. So no need to call the y.jsonToXML() on this one.

    -- Nagesh
    0
  • I'm getting the same error ("Exception: Can't find method jsonToXml(object)") when calling y.jsonToXml in an included Execute script.

    Does it still exist?
    0
  • QUOTE (alf @ Jun 28 2009, 12:16 PM) <{POST_SNAPBACK}>
    I'm getting the same error ("Exception: Can't find method jsonToXml(object)") when calling y.jsonToXml in an included Execute script.

    Does it still exist?


    Hi, I finally debugged this a bit and found an issue which was causing the signature to not be found even when passing it a JSON object. Assuming you're referring to the same issue - passing a JSON native object to jsonToXml that results in a 'Can't find method' then I can confirm that this will be fixed in the next release which is due very shortly.

    thanks,
    -- Nagesh
    0

Recent Posts

in YQL