views:

436

answers:

1

Im trying to use http://www.javarants.com/2008/04/13/using-google-app-engine-to-extend-yahoo-pipes/ as inspiration, but I'm having some troubles with the output.

Its obvious when testing with the console and the App Engine "django util simplejson":

/cygdrive/c/Program Files/Google/google_appengine/lib/django
$ python
Python 2.5.2 (r252:60911, Dec  2 2008, 09:26:14) 
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.utils import simplejson as json
>>> json.dumps('/')
'"\\/"'
>>> json.dumps('http://stackoverflow.com')
'"http:\\/\\/stackoverflow.com"

As far as I can read this is ok behavior:

In JSON only the backslash, double quote and ASCII control characters need to be escaped. Forward slashes may be escaped as in the URL example below, but do not have to be.

But when inputting back to yahoopipes, they don't "unescape" the output and all my urls and html doesnt work.

should I really do a

self.response.out.write(json.dumps(obj).replace('\\/','/'))

?

==== Edit ===

To my great suprise I see that newest simplejson downloaded from simplejson site doesnt do the "slash" stuff :( So the real issue is with app engines django.util.simplejson version?

=== Edit again ===

And now Ive created an issue in the tracker for it: http://code.google.com/p/googleappengine/issues/detail?id=1128

A: 

Nothing here to see. The ticket is there, but thats it, as far as I can see

svrist