We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b3f993 commit f4e17ddCopy full SHA for f4e17dd
docs/usage.rst
@@ -181,14 +181,14 @@ JSON values using the :mod:`json <python:json>` module.
181
182
try:
183
def _encoder(value):
184
- return json.dumps(value).encode('utf-8')
+ return json.dumps(value)
185
186
def _decoder(value):
187
- return json.loads(value.decode('utf-8'))
+ return json.loads(value)
188
189
await conn.set_type_codec(
190
'json', encoder=_encoder, decoder=_decoder,
191
- schema='pg_catalog', binary=True
+ schema='pg_catalog'
192
)
193
194
data = {'foo': 'bar', 'spam': 1}
0 commit comments