-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 17 Dec 2009, at 12:18, Krishnakant wrote:

> Hello all,
> I have been searching for some good json example for pylons  
> application.


Mariano's tightly-focused pointer should have landed you in the right  
place in that chapter of the Pylons book.

Watch out for datetime objects, they can't be directly serialised by  
simplejson's dumps().

See these various approaches:

1. Datetime-specific:

http://stackoverflow.com/questions/455580/json-datetime-between-python-and-javascript

and

http://code.activestate.com/recipes/200839/

2. Serialising arbitrary Python objects to JSON using __dict__

http://www.marcstober.com/blog/2007/07/07/serializing-arbitrary-python-objects-to-json-using-__dict__/

HTH

Cheers,

Graham

http://www.linkedin.com/in/ghiggins




-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAksqcQMACgkQOsmLt1Nhivz83QCffD2BBEHw3wVQcyXNjIwCtJyP
BOEAn38dYXvLCy9bwIIRO8w+bt1zKaitiQCVAgUBSypxA1nrWVZ7aXD1AQKELQQA
1HNodv1eWKZTZ8f9Nsx7BwYWHlvdAb436uv2cznJ877RMOqsYMEJRJlPRIu+QMQf
QTi0lqXXRwQdlc6VWTrLPDVsCx87z67F+K26Jtk1p1ojLYBlNa+ZS1AKX/SO5zVH
deolsGX4Cx/9HSQikUYZOwTTTtNkNgwvFlye1xssJkc=
=pzq8
-----END PGP SIGNATURE-----

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to