mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-08-02 19:30:09 +03:00
Add kwargs to Json dumps method
This commit is contained in:
parent
90b26c3e23
commit
6922a05366
|
@ -62,14 +62,14 @@ class Json(object):
|
||||||
if proto is ISQLQuote:
|
if proto is ISQLQuote:
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def dumps(self, obj):
|
def dumps(self, obj, **kwargs):
|
||||||
"""Serialize *obj* in JSON format.
|
"""Serialize *obj* in JSON format.
|
||||||
|
|
||||||
The default is to call `!json.dumps()` or the *dumps* function
|
The default is to call `!json.dumps()` or the *dumps* function
|
||||||
provided in the constructor. You can override this method to create a
|
provided in the constructor. You can override this method to create a
|
||||||
customized JSON wrapper.
|
customized JSON wrapper.
|
||||||
"""
|
"""
|
||||||
return self._dumps(obj)
|
return self._dumps(obj, **kwargs)
|
||||||
|
|
||||||
def prepare(self, conn):
|
def prepare(self, conn):
|
||||||
self._conn = conn
|
self._conn = conn
|
||||||
|
|
Loading…
Reference in New Issue
Block a user