{"Entry":{"collection":"func","key":"jsonb-object","name":"jsonb_object","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.5"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"d32b7cd2191b7cd6b9aa3a7d20c71ad4769dcf193d7f34cb8c038c4554bdf5ed","derived_content_hash":"4ed3b6065e877f947baf41d7358f59059470d360e5236ef7470bd0ff77ab13b2","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:a9bf59b50e819a23e4601fc174e184a615fdda6dae0fe368b07dc27b7e4403b1","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"9.5","group":"json","group_label":"Json Functions And Operators","groups":["json"],"imported_at":"2026-09-14T21:49:48.803868+08:00","last_version":"20","name":"jsonb_object","name_key":"jsonb_object","position":16036,"present_in":["9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"12c4f1868c5efd0da666dce6d61ab1cf08c9fa0763f41fcc745c1ecba81e4199","repair":"wiki-repair-20261023"},"signature":"jsonb_object ( text[] ) → jsonb","signature_count":2,"slug":"jsonb-object","source_rev":"wiki-repair-20261023:a9bf59b50e819a23e4601fc174e184a615fdda6dae0fe368b07dc27b7e4403b1","summary":"Builds a JSON object out of a text array.","summary_zh":""}},"Definition":{"Collection":"func","Key":"jsonb-object","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"jsonb-object","SourceRevision":"wiki-repair-20261023:a9bf59b50e819a23e4601fc174e184a615fdda6dae0fe368b07dc27b7e4403b1","Facts":{"description":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_html":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_zh":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","description_zh_html":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","doc":{"anchor":"FUNCTIONS-JSON-CREATION-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","version":"18.7"},{"file":"functions-json.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"31b98fa7f00387abf441728c31918bfe8b368642bceeb8bba88a73c3fbd607de","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"json","group_label":"JSON 函数和操作符","lang":"en","layout":"table-new","pages":["functions-json.html"],"prose_only":false,"signatures":[{"description":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_html":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_zh":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","description_zh_html":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","examples":[{"expr":"json_object('{a, 1, b, \"def\", c, 3.5}')","result":"{\"a\" : \"1\", \"b\" : \"def\", \"c\" : \"3.5\"}"},{"expr":"json_object('{{a, 1}, {b, \"def\"}, {c, 3.5}}')","result":"{\"a\" : \"1\", \"b\" : \"def\", \"c\" : \"3.5\"}"}],"html":"\u003ccode class=\"function\"\u003ejsonb_object\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_object ( text[] ) → jsonb","zh_from":"same-version-manual"},{"description":"This form of json_object takes keys and values pairwise from separate text arrays. Otherwise it is identical to the one-argument form.","description_html":"This form of \u003ccode class=\"function\"\u003ejson_object\u003c/code\u003e takes keys and values pairwise from separate text arrays. Otherwise it is identical to the one-argument form.","description_zh":"这种形式的 json_object 从单独的 text 数组中成对地获取键和值。除此之外，它与单参数形式相同。","description_zh_html":"这种形式的 \u003ccode class=\"function\"\u003ejson_object\u003c/code\u003e 从单独的 text 数组中成对地获取键和值。除此之外，它与单参数形式相同。","examples":[{"expr":"json_object('{a,b}', '{1,2}')","result":"{\"a\": \"1\", \"b\": \"2\"}"}],"html":"\u003ccode class=\"function\"\u003ejsonb_object\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ekeys\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003evalues\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_object ( keys text[], values text[] ) → jsonb","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-json.html","sha256":"a412feb14a229f1d9f14fa2d7735255aa297d5eb8f2971d744d9dfee659c7cca"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-JSON-CREATION-TABLE","file":"functions-json.html","sha256":"060b67147827d70ddcf5948833ddfbeada321366476016c8b8b7d68afda8045c","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"jsonb-object","SourceDatabase":"center","Version":"18","Locale":"en","Title":"jsonb_object","Summary":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","BodyHTML":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","SourceRevision":"wiki-repair-20261023:a9bf59b50e819a23e4601fc174e184a615fdda6dae0fe368b07dc27b7e4403b1","ContentHash":"18e6073280eed7fa2c0a5fd37796466b3949db827b68de390f62b34a14c76979","Payload":{"description":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_html":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","signatures":[{"description":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_html":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_zh":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","description_zh_html":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","examples":[{"expr":"json_object('{a, 1, b, \"def\", c, 3.5}')","result":"{\"a\" : \"1\", \"b\" : \"def\", \"c\" : \"3.5\"}"},{"expr":"json_object('{{a, 1}, {b, \"def\"}, {c, 3.5}}')","result":"{\"a\" : \"1\", \"b\" : \"def\", \"c\" : \"3.5\"}"}],"html":"\u003ccode class=\"function\"\u003ejsonb_object\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_object ( text[] ) → jsonb","zh_from":"same-version-manual"},{"description":"This form of json_object takes keys and values pairwise from separate text arrays. Otherwise it is identical to the one-argument form.","description_html":"This form of \u003ccode class=\"function\"\u003ejson_object\u003c/code\u003e takes keys and values pairwise from separate text arrays. Otherwise it is identical to the one-argument form.","description_zh":"这种形式的 json_object 从单独的 text 数组中成对地获取键和值。除此之外，它与单参数形式相同。","description_zh_html":"这种形式的 \u003ccode class=\"function\"\u003ejson_object\u003c/code\u003e 从单独的 text 数组中成对地获取键和值。除此之外，它与单参数形式相同。","examples":[{"expr":"json_object('{a,b}', '{1,2}')","result":"{\"a\": \"1\", \"b\": \"2\"}"}],"html":"\u003ccode class=\"function\"\u003ejsonb_object\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ekeys\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003evalues\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_object ( keys text[], values text[] ) → jsonb","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"e3b42c47c42807ddfa4eab7bc71e6de7c208a397ea8f8989950f70d34bfaa353","Text":"jsonb_object ( text[] ) → jsonb","Returns":"jsonb","Payload":{"description":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_html":"Builds a JSON object out of a text array. The array must have either exactly one dimension with an even number of members, in which case they are taken as alternating key/value pairs, or two dimensions such that each inner array has exactly two elements, which are taken as a key/value pair. All values are converted to JSON strings.","description_zh":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","description_zh_html":"从 text 数组构造 JSON 对象。该数组必须是一维且包含偶数个成员，此时将成员按交替的键/值对处理；或者是二维数组，且每个内部数组恰好有两个元素，将这两个元素作为一个键/值对。所有值都转换为 JSON 字符串。","examples":[{"expr":"json_object('{a, 1, b, \"def\", c, 3.5}')","result":"{\"a\" : \"1\", \"b\" : \"def\", \"c\" : \"3.5\"}"},{"expr":"json_object('{{a, 1}, {b, \"def\"}, {c, 3.5}}')","result":"{\"a\" : \"1\", \"b\" : \"def\", \"c\" : \"3.5\"}"}],"html":"\u003ccode class=\"function\"\u003ejsonb_object\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_object ( text[] ) → jsonb","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":1,"Hash":"85e830dc8ea8563bb989e7fdcc8d829ebde307f4aade72a78ebb8b0b6831d1cf","Text":"jsonb_object ( keys text[], values text[] ) → jsonb","Returns":"jsonb","Payload":{"description":"This form of json_object takes keys and values pairwise from separate text arrays. Otherwise it is identical to the one-argument form.","description_html":"This form of \u003ccode class=\"function\"\u003ejson_object\u003c/code\u003e takes keys and values pairwise from separate text arrays. Otherwise it is identical to the one-argument form.","description_zh":"这种形式的 json_object 从单独的 text 数组中成对地获取键和值。除此之外，它与单参数形式相同。","description_zh_html":"这种形式的 \u003ccode class=\"function\"\u003ejson_object\u003c/code\u003e 从单独的 text 数组中成对地获取键和值。除此之外，它与单参数形式相同。","examples":[{"expr":"json_object('{a,b}', '{1,2}')","result":"{\"a\": \"1\", \"b\": \"2\"}"}],"html":"\u003ccode class=\"function\"\u003ejsonb_object\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ekeys\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003evalues\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ejsonb\u003c/code\u003e","returns":"jsonb","text":"jsonb_object ( keys text[], values text[] ) → jsonb","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
