Your intuition was very good :) The output indeed looks good and would
be accepted by the browser's evaluation engine, because it constitutes a
valid JavaScript object. Unfortunately, I wasn't aware that the strings
in JSON must be double-quoted, not single-quoted. And my version of
Python on the server is too old to have the json module in the library.
So I implemented my own in a somewhat non-compliant way.
The implementation is correct now and validates in jsonlint.com.
Thank you for the feedback!
Jacek
Great! Thanks for working on this so promptly.
I think there may be still a least one escaping problem, a side effect of the fix.
Try to parse the result of http://en.es.open-tran.eu/json/suggest/file
Somewhere there is:
"name": "GNOME",
"orig_phrase": "File exists \\"{0}\\".",
"path": "G/evolution"
And that cause problem with the parser. I think it should be:
"name": "GNOME",
"orig_phrase": "File exists \\\"{0}\\\".",
"path": "G/evolution"
Cheers,
-ys
Stupid me! I have already fixed it and verified that the strings are
fine now.
Good catch. Thanks!
Jacek
> ...I have already fixed it and verified that the strings are
> fine now.
Yes, it work fine now.
Thanks for fixing this so quickly.
Now if some day we could have the equivalent of suggest3() in REST it would be great :)
Cheers,
-ys