>>> from turbojson.jsonify import jsonify
>>>
>>> d = {1:'one', 2:'two'}
>>> jsonify(d)
Traceback (most recent call last):
File "<console>", line 1, in ?
File "<string>", line 5, in jsonify
File "_speedups.pyx", line 376, in
_speedups.BaseDispatcher.__getitem__
File "/eggs/dispatch/interfaces.py", line 15, in __call__
NoApplicableMethods: (({1: 'one', 2: 'two'},), {})
Am I crazy, or should this work?
--
Jonathan LaCour
http://cleverdevil.org
>>> from turbojson import jsonify
>>> d = {1:'one', 2:'two'}
>>> jsonify.encode(d)
'{"1": "one", "2": "two"}'
>>>
--
Jorge Godoy <jgo...@gmail.com>
Which is to say use "encode" instead of "jsonify". simplejson knows
how to handle dicts directly, so it doesn't need the generic function.
Kevin