mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-08-02 11:20:08 +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:
|
||||
return self
|
||||
|
||||
def dumps(self, obj):
|
||||
def dumps(self, obj, **kwargs):
|
||||
"""Serialize *obj* in JSON format.
|
||||
|
||||
The default is to call `!json.dumps()` or the *dumps* function
|
||||
provided in the constructor. You can override this method to create a
|
||||
customized JSON wrapper.
|
||||
"""
|
||||
return self._dumps(obj)
|
||||
return self._dumps(obj, **kwargs)
|
||||
|
||||
def prepare(self, conn):
|
||||
self._conn = conn
|
||||
|
|
Loading…
Reference in New Issue
Block a user