Menu

#5 Option to wrap JSON in Javascript function call

open
nobody
None
5
2007-04-25
2007-04-25
No

How about providing the ability to wrap the JSON in a Javascript call? In other words, the output from the serializer would be:

someFunction({"field1":"val1"});

My syntax might be off, but that's the idea... that would allow you to use the serializer to generate the response to an AJAX call using the dymamic <script> tag technique... a developer would be able to provide web services like Yahoo and Google offer for doing cross-domain AJAX calls simply by populating an object, serializing it with your library and sticking it in the response.

Discussion


Log in to post a comment.