Option to wrap JSON in Javascript function call
Brought to you by:
charliehubbard
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.