On Monday, June 8, 2015 at 5:23:03 AM UTC-4, Martin Stein wrote:
>
> @Jonathan: Probably you know this already, but have you seen the 
> 'add_adapter' method for extending the pyramid JSON renderer? One of the 
> first things I do when I start a new Pyramid-project is to add an adapter 
> for datetime.
>

IIRC, we started with add_adapter but quickly outgrew it.

We have well over 10 different datatypes that need JSON overrides – and we 
serialize a lot of data to JSON for caching, actual data storage, and 
debugging in templates.

Eventually, it made more sense for us to centralize and maintain all the 
`py_2_json` and `json_2_py` functions in a single shared library file, and 
just import that single interface throughout our code.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to