Commit Graph

17 Commits

Author SHA1 Message Date
Jon Dufresne
c1d3948be9 Update documentation to reflect JSON import behavior
The docs don't need to describe what will happen on Python versions
before 2.6 as they are unsupported by psycopg2.

Should have been included in commit
d58844e548, but was missed.
2017-11-28 06:38:44 -08:00
Jon Dufresne
d58844e548 Clean up JSON workarounds for unsupported Python versions
All Python versions supported by psycopg2 have the json module. It was
added in Python 2.6. Can remove checks for availability, slightly
simplifying the code.
2017-11-26 17:11:27 -08:00
Daniele Varrazzo
789eb64f3a Added Json.prepare()
Close #562
2017-06-16 01:37:49 +01:00
Daniele Varrazzo
91d2158de7 Python source cleanup using flake8 2016-10-11 00:11:55 +01:00
Daniele Varrazzo
569fd0975b Python 3.1 bytes.decode() doesn't support keyword arguments
Sucker.
2015-02-08 19:43:09 +00:00
Daniele Varrazzo
9d547469b8 Add register_default_jsonb() and register the type 2014-08-13 02:02:01 +01:00
Daniele Varrazzo
6bca443e37 Added name param to register_json() 2014-08-13 02:01:55 +01:00
Daniele Varrazzo
6192a4fb17 Added str() for the Json adapter
Fixes ticket #191.
2014-02-22 20:45:35 +00:00
Daniele Varrazzo
b894539007 Fixed json doc error 2012-09-25 00:12:57 +01:00
Daniele Varrazzo
71e2f190c2 Json documentation improved 2012-09-24 11:51:35 +01:00
Daniele Varrazzo
a3418052e9 Don't create/register a json array typecaster if no oid provided 2012-09-24 11:23:09 +01:00
Daniele Varrazzo
5645e7adef Pasto fixed 2012-09-20 03:44:50 +01:00
Daniele Varrazzo
9b2ad7abb5 Fixed json typecaster with NULL input 2012-09-20 00:39:34 +01:00
Daniele Varrazzo
7386b8327c Dropped keywords passthrough in Json adapter
Pass a dumps function instead. Allow customizing by either arg passing or
subclassing.

The basic Json class now raises ImportError on getquoted() if json is not
available, thus allowing using a customized Json subclass even when the json
module is not available.
2012-09-19 16:32:57 +01:00
Daniele Varrazzo
d963b478e2 Added register_default_json() function
Register a typecaster for PostgreSQL 9.2 json.
2012-09-19 15:49:00 +01:00
Daniele Varrazzo
26d71b4cba First parameter of register_json defaults to None 2012-09-19 15:31:28 +01:00
Daniele Varrazzo
024f0dbada Added json typecaster 2012-09-19 04:26:35 +01:00