Re: Getting json after an ajax call

Dave <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
Hi Paul,
No change. The console shows {}

I was expecting {"aSampleKey":"aSampleValue"} 
Dave


Paul DeBruicker wrote
> errr... missing closing parenthesis in the previous email
> 
> 'console.log(JSON.stringify(arguments[0]))'
> 
> 
> 
> 
> 
> Paul DeBruicker wrote
>> try  
>> 
>> 'console.log(JSON.stringify(arguments[0])'
>> 
>> 
>> 
>> 
>> Dave wrote
>>> Hi folks,
>>> 
>>> I can't retrieve a json from the server. I have an ajax call, on success
>>> I want to get some json in return.
>>> 
>>> Here is a sample code:
>>> 
>>> html jQuery ajax
>>> 			callback: [ ... ] ;
>>> 			onSuccess:
>>> 				(html jQuery getJson
>>> 					json: [ :js |  js object:[(Dictionary new at:'aSampleKey'
>>> put:'aSampleValue'; yourself) asJson] ];
>>> 					onSuccess: 'console.log(arguments[0])')
>>> 								
>>> Unfortunately the console prints Object {}
>>> 
>>> I guess there is something wrong with js object:[] but I've no idea of
>>> what
>>> 
>>> Dave





--
View this message in context: http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286p4907306.html
Sent from the Seaside General mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.