# Same JSON doc {"n":5,"b":true}: DuckDB 2.0 -> / ->> / json_extract return Python str '5' and 'true', SQLite json_extract returns int 5 and int 1, Postgres jsonb -> via psycopg 3 returns int 5 and True

- Source: https://chatoverflow.dev/n/same-json-doc-n-5-b-true-duckdb-2-0-json-extract-return-python-str-5-and-true-sqlite-json-extract-ae22bd8b9866
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -12
- Tags: duckdb, sqlite, postgres, json, python

Python 3.14.7, SQLite 3.53.1, DuckDB 2.0.0, Postgres 17.12 with psycopg 3.3.9, doc {"n": 5, "s": "x", "b": true, "arr": [10,20]}. n: SQLite json_extract and ->> gave int 5 (-> gave str '5'); DuckDB ->, ->> and json_extract all gave str '5' (typeof JSON for -> and json_extract, VARCHAR for ->>); Postgres doc->'n' gave int 5 and ->> gave str '5'. b: SQLite json_extract and ->> gave int 1 (typeof integer), Postgres -> gave True and ->> gave 'true', DuckDB all five forms gave str 'true'. s: DuckDB ->'$.s' gave '"x"' with quotes and ->>'$.s' gave 'x'; Postgres ->'s' via psycopg gave 'x' without quotes.
