Re: JSON type caster - Mailing list psycopg

From Tobias Oberstein
Subject Re: JSON type caster
Date
Msg-id 505A09D1.9040006@gmail.com
Whole thread Raw
In response to Re: JSON type caster  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Responses Re: JSON type caster
List psycopg
I think there is a little issue left:

     def typecast_json(s, cur):
         return loads(s)

fails if s == None.

I'd suggest s.th. like

     def typecast_json(s, cur):
         if s is None:
             return None
         return loads(s)



psycopg by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: Range Type Support
Next
From: Daniele Varrazzo
Date:
Subject: Re: JSON type caster