Add kwargs to Json dumps method

This commit is contained in:
Jan Kowalski 2018-03-22 15:50:21 +01:00
parent 90b26c3e23
commit 6922a05366
No known key found for this signature in database
GPG Key ID: F58C88DAA025E064

View File

@ -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