]> git.ipfire.org Git - thirdparty/psycopg.git/commit
feat: allow binary JSON dumps 568/head
authorLionel Panhaleux <lionel.panhaleux@gmail.com>
Fri, 19 May 2023 12:03:29 +0000 (14:03 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 4 Jun 2023 22:28:20 +0000 (00:28 +0200)
commit25df8e892c8495a60fe72d85c5a2a9b0cd10dbef
tree1d876bb6a74a895e418eb8661efc53e7c6c57bfe
parent580ea8c57b2e57ab1e7e6392e130348ac4d9b146
feat: allow binary JSON dumps

Some JSON libraries, in particular the widespread
[orjson](https://github.com/ijl/orjson#quickstart) library, directly
dump data in binary format.

This change allows it and avoids having to decode/encode in these cases
by testing the return type of the `dumps` function.
docs/news.rst
psycopg/psycopg/types/json.py
tests/types/test_json.py